Codebase list clitest / 3506432
smoke-test: make output more explicit Antonio Terceiro 3 years ago
1 changed file(s) with 15 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
00 #!/bin/sh
11
22 exec 2>&1
3
4 should_pass() {
5 "$@"
6 }
7 should_fail() {
8 ! "$@"
9 }
10
311 set -ex
412
13
514 # these should pass
6 clitest examples/cut.txt
7 clitest --prefix tab examples/cut.md
8 clitest examples/hello-world.txt
9 clitest examples/intro.txt
15 should_pass clitest examples/cut.txt
16 should_pass clitest --prefix tab examples/cut.md
17 should_pass clitest examples/hello-world.txt
18 should_pass clitest examples/intro.txt
1019
11 # this should fail
12 rc=0
13 clitest examples/will-fail.txt || rc=$?
14 test $rc -ne 0
20 # these should fail
21 should_fail clitest examples/will-fail.txt