git @ Cat's Eye Technologies Falderal / b16f43b
Add failing test for new, proposed format, not yet implemented. Chris Pressey 5 years ago
3 changed file(s) with 73 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1212 test-bad-indentation
1313 test-input-sections test-shared-body
1414 test-stdout-stderr test-err-no-stderr
15 test-new-format
1516 "
1617 for TEST in ${FIRST_TESTS}; do
1718 echo ${TEST}...
0 FAILED :
1
2 Demonstrate error expectation (Intentional fail.)
3
4 Location: test-pass-fail.markdown, line 55
5 Function: Cat
6 Impl : shell command "python cat.py"
7 Body : meow
8 Expected: error:
9 woof
10 Actual : output:
11 meow
12
13 --------------------------------
14 Total test runs: 6, failures: 1
15 --------------------------------
0 Falderal Test: "new" format for tests
1 -------------------------------------
2
3 This document tests the alternate format for tests introduced in
4 the Falderal Literate Test Format version 0.11. This format allows
5 the test body to consist entirely of un-prefixed text, as long as
6 it is written in a single indented block, and the final line(s) of
7 the test begin with the prefix `==>` or `??> `
8
9 -> Functionality "Cat" is implemented by shell command "python cat.py"
10
11 -> Tests for functionality "Cat"
12
13 Cat cats.
14
15 meow
16 ==> meow
17
18 There may be multiple final lines.
19
20 purr
21 prrr
22 prreow
23 ==> purr
24 ==> prrr
25 ==> prreow
26
27 The use of `==>` means that any text in the preceding lines that would,
28 in the previous format, be recognized as prefixes, are no longer recognized
29 as prefixes.
30
31 | purr
32 | prrr
33 | prreow
34 ==> | purr
35 ==> | prrr
36 ==> | prreow
37
38 | purr
39 + prrr
40 + prreow
41 ==> | purr
42 ==> + prrr
43 ==> + prreow
44
45 purr
46 -> prrr
47 prreow
48 ==> purr
49 ==> -> prrr
50 ==> prreow
51
52 Demonstrate error expectation (Intentional fail.)
53
54 meow
55 ??> woof