README (1870B)
1 There aren't any proper tests currently, but some infrastructure is in place to support them. 2 3 When compiled with TEST=1, ledit accepts commands on standard input to generate fake events. 4 Each command ends in newline. If the last argument is text, it may also contain newlines if 5 they are escaped with backslash. Single backslashes that are not in front of a newline are 6 just taken verbatim, but two backslashes are collapsed into one. Filenames are a special 7 case because they are not allowed to contain '/' or '\0'. 8 9 The commands to generate events take raw integers instead of symbolic names for keysyms 10 and other parameters. These need to be given using the definitions from Xlib. 11 12 The commands currently supported are the following: 13 14 k <key_state> <keysym> <text> 15 16 Generate a keypress event. <key_state> and <keysym> are the modifier state and keysym. 17 18 p <button_num> <x> <y> 19 20 Generate a mouse button press event. 21 22 r <button_num> <x> <y> 23 24 Generate a mouse button release event. 25 26 m <x> <y> 27 28 Generate a mouse motion event. 29 30 l <lang> 31 32 Switch to keyboard layout <lang>. 33 34 s <view_num> 35 36 Switch to view <view_num>, if it exists. 37 38 w <filename> 39 40 Write the contents of the buffer to <filename>. 41 42 d <filename> 43 44 Dump various information to <filename>. Currently, the cursor position and 45 information about the selection is given. See ledit.c for the exact format. 46 47 u <filename> 48 49 Dump the undo stack to <filename>. See undo.c for the exact format. 50 51 TODO: Add more commands, e.g. for dumping the repetition stack. 52 53 54 When compiled with TEST=1, ledit supports an additional command-line argument '-t'. 55 This disables handling of the regular key press, mouse, and language switch events 56 in order to avoid messing with the results. 57 58 Note that regular file writing using :w is disabled when compiled with TEST=1 59 in order to avoid overwriting anything important if fuzz testing is done.