Debian Codegraph @

test/mixed.test

raw
1 #!/bin/sh
2 # test cabextract --filter and --pipe options
3 . test/testcase
4
5 "$cabextract" -p cabs/mixed.cab >$actual
6 compare_with <<'EOF'
7 If you can read this, the MSZIP decompressor is working!
8 -----------------------------------------------------------------
9 If you can read this, the LZX decompressor is working!
10 -----------------------------------------------------------------
11 If you can read this, the Quantum decompressor is working!
12 EOF
13
14 "$cabextract" -p -F 'mszip.*' cabs/mixed.cab >$actual
15 compare_with <<'EOF'
16 If you can read this, the MSZIP decompressor is working!
17 EOF
18
19 "$cabextract" -p -F '*zx*' cabs/mixed.cab >$actual
20 compare_with <<'EOF'
21 -----------------------------------------------------------------
22 If you can read this, the LZX decompressor is working!
23 -----------------------------------------------------------------
24 EOF
25
26 "$cabextract" -p -F '*m.txt' cabs/mixed.cab >$actual
27 compare_with <<'EOF'
28 If you can read this, the Quantum decompressor is working!
29 EOF
30
31 # test multiple -F options
32 "$cabextract" -p -F qtm.txt -F lzx.txt -F mszip.txt cabs/mixed.cab >$actual
33 compare_with <<'EOF'
34 If you can read this, the MSZIP decompressor is working!
35 -----------------------------------------------------------------
36 If you can read this, the LZX decompressor is working!
37 -----------------------------------------------------------------
38 If you can read this, the Quantum decompressor is working!
39 EOF
40
41 "$cabextract" -p -F '???.txt' -F mszip.txt cabs/mixed.cab >$actual
42 compare_with <<'EOF'
43 If you can read this, the MSZIP decompressor is working!
44 -----------------------------------------------------------------
45 If you can read this, the LZX decompressor is working!
46 -----------------------------------------------------------------
47 If you can read this, the Quantum decompressor is working!
48 EOF
49
50 read status < $status && test "x$status" = xsuccess