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 args <args...>
19 # Ends a test case, killing the LyX instance under test, and
20 # executing the <cmd...> commands into an os.system(). The exit status
21 # of the commands sequence determines success or failure of the test
24 # Feeds the running LyX instance with the specified key characters.
26 # \A<char> ...... sends the sequence [Alt+<char>]
27 # \[<dir>] ...... sends a cursor movement, <dir> = Right, Left, Up, Down
28 # \[Tab] ........ sends a Tab character
29 # \[Return] ..... sends a Return
32 # This example instructs LyX to type "Hello World", then exports it as
33 # LaTeX, and verifies that the typed characters are indeed present in the
36 Exec rm -f /tmp/test.lyx /tmp/test.tex
37 TestBegin /tmp/test.lyx 2> /tmp/log 2>&1
41 KK: buffer-export latex\[Return]
42 TestEnd grep "Hello World" /tmp/test.tex