Debian Codegraph @

testsuite/pdfgrep.tests/exit_status.exp

raw
1 set test "Exit status is 0 when something is found"
2
3 clear_pdfdir
4 set pdf [mkpdf exit-status "foobar"]
5
6 pdfgrep foobar $pdf
7 expect eof
8 expect_exit_status 0
9
10 ########################################
11
12 set test "Exit status is 0 when something is found, also with --quiet"
13
14 pdfgrep --quiet foobar $pdf
15
16 expect eof
17 expect_exit_status 0
18
19
20 ########################################
21
22 set test "Exit status is 1 when nothing is found"
23
24 pdfgrep not-there $pdf
25
26 expect eof
27 expect_exit_status 1
28
29 ########################################
30
31 set test "Exit status is 2 on error"
32
33 clear_pdfdir
34
35 # $pdf doesn't exist anymore
36 pdfgrep foobar $pdf
37 expect eof
38 expect_exit_status 2