git @ Cat's Eye Technologies Falderal / 9ec4f9f
Split up tests that were glommed together. Chris Pressey 1 year, 9 months ago
7 changed file(s) with 101 addition(s) and 89 deletion(s). Raw diff Collapse all Expand all
1212
1313 FIRST_TESTS="
1414 test-pass-fail test-no-functionality test-ill-formed test-no-test-body
15 test-var-subst-no-eol
15 test-var-subst test-no-eol
1616 test-utf8 test-crlf
1717 test-bad-indentation
1818 test-shell-quoting
0 --------------------------------
1 Total test runs: 4, failures: 0
2 --------------------------------
0 Missing EOL at end of output
1 ----------------------------
2
3 It makes no difference whether there is an EOL at the end of
4 the test output or not.
5
6 -> Functionality "Echo" is implemented by
7 -> shell command "python echo.py %(test-body-text)"
8
9 -> Tests for functionality "Echo"
10
11 | hello
12 = hello
13
14 | hi
15 | hi
16 = hi
17 = hi
18
19 -> Functionality "Echo, no newline" is implemented by
20 -> shell command "python echo.py -n %(test-body-text)"
21
22 -> Tests for functionality "Echo, no newline"
23
24 | hello
25 = hello
26
27 | hi
28 | hi
29 = hi
30 = hi
+0
-3
tests/test-var-subst-no-eol.expected less more
0 --------------------------------
1 Total test runs: 11, failures: 0
2 --------------------------------
+0
-85
tests/test-var-subst-no-eol.markdown less more
0 Falderal Test 5
1 ---------------
2
3 Tests for variable substitution, and missing EOL at end
4 of output.
5
6 Note that Falderal is responsible for quoting the substitution text
7 of all `%(...)` variables occurring in a shell command template;
8 it is not necessary to put any quotes around them in the template string.
9
10 -> Functionality "Echo" is implemented by
11 -> shell command "python echo.py %(test-body-text)"
12
13 -> Tests for functionality "Echo"
14
15 | hello
16 = hello
17
18 | hi
19 | hi
20 = hi
21 = hi
22
23 -> Functionality "Echo, no newline" is implemented by
24 -> shell command "python echo.py -n %(test-body-text)"
25
26 -> Tests for functionality "Echo, no newline"
27
28 | hello
29 = hello
30
31 | hi
32 | hi
33 = hi
34 = hi
35
36 Note that when variables are expanded, backslash sequences in the
37 replacement string ("\n", etc) are not expanded.
38
39 -> Tests for functionality "Echo"
40
41 | he\nl\tl\\o
42 = he\nl\tl\\o
43
44 Note that single quotes needn't be supplied around `%(test-body-file)`
45 or `%(output-file)`.
46
47 -> Functionality "Cat, from file" is implemented by
48 -> shell command "python cat.py -f %(test-body-file)"
49
50 -> Tests for functionality "Cat, from file"
51
52 | hello
53 = hello
54
55 | hi
56 | hi
57 = hi
58 = hi
59
60 -> Functionality "Cat, to file" is implemented by
61 -> shell command "python cat.py -o %(output-file)"
62
63 -> Tests for functionality "Cat, to file"
64
65 | hello
66 = hello
67
68 | hi
69 | hi
70 = hi
71 = hi
72
73 -> Functionality "Cat, to and from file" is implemented by
74 -> shell command "python cat.py -f %(test-body-file) -o %(output-file)"
75
76 -> Tests for functionality "Cat, to and from file"
77
78 | hello
79 = hello
80
81 | hi
82 | hi
83 = hi
84 = hi
0 --------------------------------
1 Total test runs: 7, failures: 0
2 --------------------------------
0 Variable substitution
1 ---------------------
2
3 Tests for variable substitution, and quoting rules during such.
4
5 Note that Falderal is responsible for quoting the substitution text
6 of all `%(...)` variables occurring in a shell command template;
7 it is not necessary to put any quotes around them in the template string.
8
9 ...
10
11 Note that when variables are expanded, backslash sequences in the
12 replacement string ("\n", etc) are not expanded.
13
14 -> Functionality "Echo" is implemented by
15 -> shell command "python echo.py %(test-body-text)"
16
17 -> Tests for functionality "Echo"
18
19 | he\nl\tl\\o
20 = he\nl\tl\\o
21
22 Note that single quotes needn't be supplied around `%(test-body-file)`
23 or `%(output-file)`.
24
25 -> Functionality "Cat, from file" is implemented by
26 -> shell command "python cat.py -f %(test-body-file)"
27
28 -> Tests for functionality "Cat, from file"
29
30 | hello
31 = hello
32
33 | hi
34 | hi
35 = hi
36 = hi
37
38 -> Functionality "Cat, to file" is implemented by
39 -> shell command "python cat.py -o %(output-file)"
40
41 -> Tests for functionality "Cat, to file"
42
43 | hello
44 = hello
45
46 | hi
47 | hi
48 = hi
49 = hi
50
51 -> Functionality "Cat, to and from file" is implemented by
52 -> shell command "python cat.py -f %(test-body-file) -o %(output-file)"
53
54 -> Tests for functionality "Cat, to and from file"
55
56 | hello
57 = hello
58
59 | hi
60 | hi
61 = hi
62 = hi