git @ Cat's Eye Technologies Falderal / 89d3b32
Remove compatibility `test` argument and rename another test. Chris Pressey 5 years ago
7 changed file(s) with 58 addition(s) and 58 deletion(s). Raw diff Collapse all Expand all
33 Version 0.11-PRE "Dan Ryan Expressway" (current development version):
44
55 * Renamed the internal tests to have more descriptive names (in progress.)
6 * The first command-line argument being `test` for compatibility with
7 previous versions of `falderal` has been removed.
68
79 Version 0.10 "Shedd Aquarium" (current released version):
810
3434 help="print out info about each test as it is run")
3535
3636 (options, args) = parser.parse_args(args[1:])
37
38 # for compatibility with previous versions of falderal
39 if args and args[0] == 'test':
40 args = args[1:]
4137
4238 if options.test:
4339 import doctest
66 cd tests
77
88 FIRST_TESTS="
9 test1 test2 test3 test4 test5 test9
10 test-bad-indentation test-input-sections test-utf8 test-crlf
11 test-err-no-stderr test-shared-body
9 test1 test2 test3 test4 test5
10 test-utf8 test-crlf
11 test-bad-indentation
12 test-input-sections test-shared-body
13 test-stdout-stderr test-err-no-stderr
1214 "
1315 for TEST in ${FIRST_TESTS}; do
1416 echo ${TEST}...
0 --------------------------------
1 Total test runs: 4, failures: 0
2 --------------------------------
0 Falderal Test: Standard output and standard error
1 -------------------------------------------------
2
3 When we have a test that expects a successful result, the
4 expected text is matched against standard output.
5
6 -> Functionality "Succeed" is implemented by shell command
7 -> "python fail.py '%(test-body-text)' bar 0"
8
9 -> Tests for functionality "Succeed"
10
11 | foo
12 = foo
13
14 If you wish to match the expected result against both standard
15 output and standard error, it's up to you to redirect them.
16
17 -> Functionality "Succeed/All" is implemented by shell command
18 -> "python fail.py '%(test-body-text)' bar 0 2>&1"
19
20 -> Tests for functionality "Succeed/All"
21
22 | foo
23 = foo
24 = bar
25
26 When we have a test that expects an error result, the
27 expected text is matched against standard error.
28
29 -> Functionality "Fail" is implemented by shell command
30 -> "python fail.py foo '%(test-body-text)' 1"
31
32 -> Tests for functionality "Fail"
33
34 | bar
35 ? bar
36
37 If you wish to match the expected error against both standard
38 output and standard error, it's up to you to redirect them.
39
40 -> Functionality "Fail/All" is implemented by shell command
41 -> "python fail.py foo '%(test-body-text)' 1 1>&2"
42
43 -> Tests for functionality "Fail/All"
44
45 | bar
46 ? foo
47 ? bar
+0
-3
tests/test9.expected less more
0 --------------------------------
1 Total test runs: 4, failures: 0
2 --------------------------------
+0
-48
tests/test9.markdown less more
0 Falderal Test 9
1 ---------------
2
3 When we have a test that expects a successful result, the
4 expected text is matched against standard output.
5
6 -> Functionality "Succeed" is implemented by shell command
7 -> "python fail.py '%(test-body-text)' bar 0"
8
9 -> Tests for functionality "Succeed"
10
11 | foo
12 = foo
13
14 If you wish to match the expected result against both standard
15 output and standard error, it's up to you to redirect them.
16
17 -> Functionality "Succeed/All" is implemented by shell command
18 -> "python fail.py '%(test-body-text)' bar 0 2>&1"
19
20 -> Tests for functionality "Succeed/All"
21
22 | foo
23 = foo
24 = bar
25
26 When we have a test that expects an error result, the
27 expected text is matched against standard error.
28
29 -> Functionality "Fail" is implemented by shell command
30 -> "python fail.py foo '%(test-body-text)' 1"
31
32 -> Tests for functionality "Fail"
33
34 | bar
35 ? bar
36
37 If you wish to match the expected error against both standard
38 output and standard error, it's up to you to redirect them.
39
40 -> Functionality "Fail/All" is implemented by shell command
41 -> "python fail.py foo '%(test-body-text)' 1 1>&2"
42
43 -> Tests for functionality "Fail/All"
44
45 | bar
46 ? foo
47 ? bar