##// END OF EJS Templates
test-run-tests: add tests for "#if no-false" and no-true
Adrian Buehlmann -
r16914:2030dec7 default
parent child Browse files
Show More
@@ -1,85 +1,99 b''
1 Simple commands:
1 Simple commands:
2
2
3 $ echo foo
3 $ echo foo
4 foo
4 foo
5 $ printf 'oh no'
5 $ printf 'oh no'
6 oh no (no-eol)
6 oh no (no-eol)
7 $ printf 'bar\nbaz\n' | cat
7 $ printf 'bar\nbaz\n' | cat
8 bar
8 bar
9 baz
9 baz
10
10
11 Multi-line command:
11 Multi-line command:
12
12
13 $ foo() {
13 $ foo() {
14 > echo bar
14 > echo bar
15 > }
15 > }
16 $ foo
16 $ foo
17 bar
17 bar
18
18
19 Return codes before inline python:
19 Return codes before inline python:
20
20
21 $ sh -c 'exit 1'
21 $ sh -c 'exit 1'
22 [1]
22 [1]
23
23
24 Doctest commands:
24 Doctest commands:
25
25
26 >>> print 'foo'
26 >>> print 'foo'
27 foo
27 foo
28 $ echo interleaved
28 $ echo interleaved
29 interleaved
29 interleaved
30 >>> for c in 'xyz':
30 >>> for c in 'xyz':
31 ... print c
31 ... print c
32 x
32 x
33 y
33 y
34 z
34 z
35 >>> print
35 >>> print
36
36
37
37
38 Regular expressions:
38 Regular expressions:
39
39
40 $ echo foobarbaz
40 $ echo foobarbaz
41 foobar.* (re)
41 foobar.* (re)
42 $ echo barbazquux
42 $ echo barbazquux
43 .*quux.* (re)
43 .*quux.* (re)
44
44
45 Globs:
45 Globs:
46
46
47 $ printf '* \\foobarbaz {10}\n'
47 $ printf '* \\foobarbaz {10}\n'
48 \* \\fo?bar* {10} (glob)
48 \* \\fo?bar* {10} (glob)
49
49
50 Literal match ending in " (re)":
50 Literal match ending in " (re)":
51
51
52 $ echo 'foo (re)'
52 $ echo 'foo (re)'
53 foo (re)
53 foo (re)
54
54
55 testing hghave
55 testing hghave
56
56
57 $ "$TESTDIR/hghave" true
57 $ "$TESTDIR/hghave" true
58 $ "$TESTDIR/hghave" false
58 $ "$TESTDIR/hghave" false
59 skipped: missing feature: nail clipper
59 skipped: missing feature: nail clipper
60 [1]
60 [1]
61 $ "$TESTDIR/hghave" no-true
61 $ "$TESTDIR/hghave" no-true
62 skipped: system supports yak shaving
62 skipped: system supports yak shaving
63 [1]
63 [1]
64 $ "$TESTDIR/hghave" no-false
64 $ "$TESTDIR/hghave" no-false
65
65
66 Conditional sections based on hghave:
66 Conditional sections based on hghave:
67
67
68 #if true
68 #if true
69 $ echo tested
69 $ echo tested
70 tested
70 tested
71 #else
71 #else
72 $ echo skipped
72 $ echo skipped
73 #endif
73 #endif
74
74
75 #if false
75 #if false
76 $ echo skipped
76 $ echo skipped
77 #else
77 #else
78 $ echo tested
78 $ echo tested
79 tested
79 tested
80 #endif
80 #endif
81
81
82 #if no-false
83 $ echo tested
84 tested
85 #else
86 $ echo skipped
87 #endif
88
89 #if no-true
90 $ echo skipped
91 #else
92 $ echo tested
93 tested
94 #endif
95
82 Exit code:
96 Exit code:
83
97
84 $ (exit 1)
98 $ (exit 1)
85 [1]
99 [1]
General Comments 0
You need to be logged in to leave comments. Login now