git @ Cat's Eye Technologies Falderal / 8c5d926
Merge tests with commonalities into single Falderal document. Chris Pressey 6 years ago
7 changed file(s) with 54 addition(s) and 52 deletion(s). Raw diff Collapse all Expand all
1515 test-var-subst test-no-eol
1616 test-utf8 test-crlf
1717 test-bad-indentation
18 test-shell-quoting
1918 test-input-sections test-shared-body
2019 test-stdout-stderr test-err-no-stderr
2120 test-freestyle-format
0 Missing EOL at end of output
0 Falderal Test: Missing EOL at end of output
11 ----------------------------
22
33 It makes no difference whether there is an EOL at the end of
0 Falderal Test 4
0 Falderal Test: no test body
11 ---------------
22
33 Another Falderal document which is ill-formed.
+0
-3
tests/test-shell-quoting.expected less more
0 --------------------------------
1 Total test runs: 4, failures: 0
2 --------------------------------
+0
-36
tests/test-shell-quoting.markdown less more
0 Falderal Test: shell quoting
1 ----------------------------
2
3 The test body and the test input can be passed as
4 strings to the shell command. They don't need quotes
5 around them.
6
7 -> Functionality "Echo Body" is implemented by shell command
8 -> "python echo.py %(test-body-text)"
9
10 -> Tests for functionality "Echo Body"
11
12 | foo
13 + bar
14 = foo
15
16 Single quotes in the test body text are single escaped.
17
18 | don't
19 + can't
20 = don't
21
22 -> Functionality "Echo Input" is implemented by shell command
23 -> "python echo.py %(test-input-text)"
24
25 -> Tests for functionality "Echo Input"
26
27 | foo
28 + bar
29 = bar
30
31 Single quotes in the test input text are single escaped.
32
33 | don't
34 + can't
35 = can't
00 --------------------------------
1 Total test runs: 7, failures: 0
1 Total test runs: 13, failures: 0
22 --------------------------------
0 Variable substitution
1 ---------------------
0 Falderal Test: Variable substitution
1 ------------------------------------
22
33 Tests for variable substitution, and quoting rules during such.
44
66 of all `%(...)` variables occurring in a shell command template;
77 it is not necessary to put any quotes around them in the template string.
88
9 ...
9 -> Functionality "Echo Body" is implemented by shell command
10 -> "python echo.py %(test-body-text)"
11
12 -> Tests for functionality "Echo Body"
13
14 | foo
15 + bar
16 = foo
17
18 Single quotes in the test body text are single escaped.
19
20 | don't
21 + can't
22 = don't
23
24 -> Functionality "Echo Input" is implemented by shell command
25 -> "python echo.py %(test-input-text)"
26
27 -> Tests for functionality "Echo Input"
28
29 | foo
30 + bar
31 = bar
32
33 Single quotes in the test input text are single escaped.
34
35 | don't
36 + can't
37 = can't
1038
1139 Note that when variables are expanded, backslash sequences in the
1240 replacement string ("\n", etc) are not expanded.
1341
14 -> Functionality "Echo" is implemented by
15 -> shell command "python echo.py %(test-body-text)"
16
17 -> Tests for functionality "Echo"
42 -> Tests for functionality "Echo Body"
1843
1944 | he\nl\tl\\o
2045 = he\nl\tl\\o
2146
22 Note that single quotes needn't be supplied around `%(test-body-file)`
23 or `%(output-file)`.
47 The rule that Falderal is responsible for quoting text substituted
48 into the command template extends to `%(test-body-file)` and
49 `%(test-input-file)` and `%(output-file)` as well.
2450
2551 -> Functionality "Cat, from file" is implemented by
2652 -> shell command "python cat.py -f %(test-body-file)"
6086 | hi
6187 = hi
6288 = hi
89
90 -> Functionality "Cat input, from file" is implemented by
91 -> shell command "python cat.py -f %(test-input-file)"
92
93 -> Tests for functionality "Cat input, from file"
94
95 | hekko
96 + hello
97 = hello
98
99 | hj
100 | hj
101 + hi
102 + hi
103 = hi
104 = hi