1 # Sample test script for regression tests
3 # Adapted from the syntax of the original testkeys.py by McCabe-Dansted.
4 # Run this script by providing it as single argument to run-test.sh
6 # WARNING: Syntax is poorly parsed: no extra spaces anywhere
8 # Lines starting with a '#' on the 1st column are comments
11 # Causes the execution of <cmd...> in a os.system()
14 # Starts a test case under deterministic conditions:
15 # Any currently running instance of LyX is killed
16 # A new LyX instance is spawned, with the command-line arguments
17 # specified in <args...>.
20 # Ends a test case, killing the LyX instance under test, and
21 # executing the <cmd...> commands into an os.system(). The exit status
22 # of the commands sequence determines success or failure of the test.
23 # This is equivalent to:
28 # Executes the <cmd...> commands into an os.system() and, if the
29 # exit status is non-zero, then abort the test execution making it fail.
32 # Sets the environment variable LANG to <lang>. Useful before launching
33 # LyX (i.e., before a TestBegin command, in order to set deterministically
34 # the language settings, which impacts the actual key sequences needed to
35 # operate within LyX. This way, different developers can write different
36 # test cases in different languages and still they can be executed by
40 # Feeds the running LyX instance with the specified key characters.
42 # \A<char> ...... sends the sequence [Alt+<char>]
43 # \[<dir>] ...... sends a cursor movement, <dir> = Right, Left, Up, Down
44 # \[Tab] ........ sends a Tab character
45 # \[Return] ..... sends a Return
48 # Changes the delay among typed charactes to n milliseconds.
51 # Single delay of f seconds.
54 # This example instructs LyX to type "Hello World", then exports it as
55 # LaTeX, and verifies that the typed characters are indeed present in the
58 TestBegin test.lyx -dbg key > lyx-log.txt 2>&1
61 KK: \Axbuffer-export latex\[Return]
62 TestEnd grep "Hello World" test.tex