]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-helper-cat-file
do not hang on piped input in PipedFileFdPrivate
[apt.git] / test / integration / test-apt-helper-cat-file
CommitLineData
bdc42211
DK
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7
8cat >rootdir/etc/apt/apt.conf.d/rev-as-compressor <<EOF
9APT::Compressor::rev {
10 Name "rev";
11 Extension ".rev";
12 Binary "rev";
13 Cost "1";
14};
15EOF
16
17configcompression 'ALL'
18cat >./test.txt <<EOF
19This is a test.
20EOF
21
22compressfile ./test.txt
23while 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"
30done < "${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf"