]> git.lyx.org Git - lyx.git/blob - development/autotests/hello-world-in.txt
Customization: correct some color names.
[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 arguments
17 #   specified in <args...>.
18 #
19 # TestEnd <cmd...>
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:
24 #     TestEnd
25 #     Assert <cmd...>
26 #
27 # Assert <cmd...>
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.
30 #
31 # Lang <lang>
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
37 #   anyone.
38 #
39 # KK: <chars...>
40 #   Feeds the running LyX instance with the specified key characters.
41 #   Special sequences:
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
46 #
47 # KD: n
48 #   Changes the delay among typed charactes to n milliseconds.
49 #
50 # Sleep f
51 #   Single delay of f seconds.
52 #
53 #
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
56 # exported document.
57 #
58 TestBegin test.lyx -dbg key > lyx-log.txt 2>&1
59 KK: Hello World
60 KK: \Cs
61 KK: \Axbuffer-export latex\[Return]
62 TestEnd grep "Hello World" test.tex