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...>.
19 # TestEndWithKill <cmd...>
20 # Ends a test case, killing immidiately the LyX instance under test
21 # Behaviour is otherwise the same as in 'TestEnd' below
24 # Ends a test case, closing the LyX instance under test, and
25 # executing the <cmd...> commands into an os.system(). The exit status
26 # of the commands sequence determines success or failure of the test.
27 # This is equivalent to:
32 # Executes the <cmd...> commands into an os.system() and, if the
33 # exit status is non-zero, then abort the test execution making it fail.
36 # Sets the environment variable LANG to <lang>. Useful before launching
37 # LyX (i.e., before a TestBegin command, in order to set deterministically
38 # the language settings, which impacts the actual key sequences needed to
39 # operate within LyX. This way, different developers can write different
40 # test cases in different languages and still they can be executed by
44 # Feeds the running LyX instance with the specified key characters.
46 # \A<char> ...... sends the sequence [Alt+<char>]
47 # \[<dir>] ...... sends a cursor movement, <dir> = Right, Left, Up, Down
48 # \[Tab] ........ sends a Tab character
49 # \[Return] ..... sends a Return
52 # Changes the delay among typed charactes to n milliseconds.
55 # Single delay of f seconds.
58 # This example instructs LyX to type "Hello World", then exports it as
59 # LaTeX, and verifies that the typed characters are indeed present in the
62 TestBegin test.lyx -dbg key > hello-world.loga.txt 2>&1
65 KK: \Axbuffer-export latex\[Return]
66 TestEnd grep "Hello World" test.tex