]>
Commit | Line | Data |
---|---|---|
bdc42211 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" | |
5 | . "$TESTDIR/framework" | |
6 | setupenvironment | |
7 | ||
8 | cat >rootdir/etc/apt/apt.conf.d/rev-as-compressor <<EOF | |
9 | APT::Compressor::rev { | |
10 | Name "rev"; | |
11 | Extension ".rev"; | |
12 | Binary "rev"; | |
13 | Cost "1"; | |
14 | }; | |
15 | EOF | |
16 | ||
17 | configcompression 'ALL' | |
18 | cat >./test.txt <<EOF | |
19 | This is a test. | |
20 | EOF | |
21 | ||
22 | compressfile ./test.txt | |
23 | while read compressor extension command; do | |
24 | if [ "$compressor" = '.' ]; then | |
25 | FILE='./test.txt' | |
26 | else | |
27 | FILE="./test.txt.${extension}" | |
28 | fi | |
29 | testsuccessequal "$(cat ./test.txt)" apthelper cat-file "$FILE" | |
30 | done < "${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf" |