]> git.lyx.org Git - lyx.git/blob - development/autotests/hello-world-in.txt
1b5295e961e4ef2984addf4bcef892c6358b8ba6
[lyx.git] / development / autotests / hello-world-in.txt
1 # Sample test script for regression tests
2 #
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
5 #
6 # WARNING: Syntax is poorly parsed: no extra spaces anywhere
7 #
8 # Lines starting with a '#' on the 1st column are comments
9 #
10 # Exec <cmd...>
11 #   Causes the execution of <cmd...> in a os.system()
12 #
13 # TestBegin <args...>
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...>
17 #
18 # TestEnd <cmd...>
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
22 #
23 # KK: <chars...>
24 #   Feeds the running LyX instance with the specified key characters.
25 #   Special sequences:
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
30 #
31 #
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
34 # exported document.
35 #
36 Exec rm -f /tmp/test.lyx /tmp/test.tex
37 TestBegin /tmp/test.lyx 2> /tmp/log 2>&1
38 KK: Hello World
39 KK: \Afs
40 KK: \Ax
41 KK: buffer-export latex\[Return]
42 TestEnd grep "Hello World" /tmp/test.tex