Debian Codegraph @

testing/tests/console.test

raw
1 # %TEST-DOC: Test the "--show-all" option.
2 #
3 # %TEST-REQUIRES: which script
4 #
5 # This test doesn't work on OpenBSD, because the "script" command lacks the
6 # necessary options.
7 # %TEST-REQUIRES: test `uname` != "OpenBSD"
8 #
9 # The following uses the "script" command for two btest invocations, in order
10 # to verify that "btest --show-all" works correctly when btest's stdout is
11 # a TTY.
12 #
13 # With one failing test, one succeeding, and one skipped, plus an additional
14 # summary line, this makes two lines of output for the first invocation and
15 # four for the second.
16 #
17 # %TEST-EXEC: script-command "btest t1 t2 t3" | wc -l | awk '{print $1}' >output 2>&1
18 # %TEST-EXEC: script-command "btest --show-all t1 t2 t3" | wc -l | awk '{print $1}' >>output 2>&1
19 # %TEST-EXEC: btest-diff output
20
21 %TEST-START-FILE t1
22 @TEST-EXEC: echo "A successful dummy test"
23 @TEST-EXEC: exit 0
24 %TEST-END-FILE
25
26 %TEST-START-FILE t2
27 @TEST-EXEC: echo "A failing dummy test"
28 @TEST-EXEC: exit 1
29 %TEST-END-FILE
30
31 %TEST-START-FILE t3
32 @TEST-REQUIRES: false
33 @TEST-EXEC: echo "A skipped dummy test"
34 @TEST-EXEC: exit 0
35 %TEST-END-FILE