File: mixed.test

package info (click to toggle)
cabextract 1.11-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,884 kB
  • sloc: ansic: 5,826; sh: 5,331; perl: 462; makefile: 88
file content (50 lines) | stat: -rwxr-xr-x 1,863 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
# test cabextract --filter and --pipe options
. test/testcase

"$cabextract" -p cabs/mixed.cab >$actual
compare_with <<'EOF'
If you can read this, the MSZIP decompressor is working!
-----------------------------------------------------------------
If you can read this, the LZX decompressor is working!
-----------------------------------------------------------------
If you can read this, the Quantum decompressor is working!
EOF

"$cabextract" -p -F 'mszip.*' cabs/mixed.cab >$actual
compare_with <<'EOF'
If you can read this, the MSZIP decompressor is working!
EOF

"$cabextract" -p -F '*zx*' cabs/mixed.cab >$actual
compare_with <<'EOF'
-----------------------------------------------------------------
If you can read this, the LZX decompressor is working!
-----------------------------------------------------------------
EOF

"$cabextract" -p -F '*m.txt'  cabs/mixed.cab >$actual
compare_with <<'EOF'
If you can read this, the Quantum decompressor is working!
EOF

# test multiple -F options
"$cabextract" -p -F qtm.txt -F lzx.txt -F mszip.txt cabs/mixed.cab >$actual
compare_with <<'EOF'
If you can read this, the MSZIP decompressor is working!
-----------------------------------------------------------------
If you can read this, the LZX decompressor is working!
-----------------------------------------------------------------
If you can read this, the Quantum decompressor is working!
EOF

"$cabextract" -p -F '???.txt' -F mszip.txt cabs/mixed.cab >$actual
compare_with <<'EOF'
If you can read this, the MSZIP decompressor is working!
-----------------------------------------------------------------
If you can read this, the LZX decompressor is working!
-----------------------------------------------------------------
If you can read this, the Quantum decompressor is working!
EOF

read status < $status && test "x$status" = xsuccess