summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-718329-support-data.tar-uncompressed
blob: 9318025300f8446abdbca5a98c78ae49744b5fa6 (plain)
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
#!/bin/sh
set -e

art() {
    ar t "$@" | grep -v control.tar
}

test_process_package_with_compression() {
    COMPRESSOR="$1"
    DATA_TAR="$2"

    msgmsg "Testing apt-ftparchive with compression type: $COMPRESSOR"

    buildsimplenativepackage 'pkg' 'all' '1.0' '' '' 'some descr' '' '' '' "$COMPRESSOR"
    testsuccessequal "debian-binary
$DATA_TAR" art incoming/pkg_1.0_all.deb

    testequal "Package: pkg" echo "$(aptftparchive packages incoming/|grep ^Package)"

    testsuccessequal "usr/bin/pkg-all						    pkg
usr/share/doc/pkg/FEATURES				    pkg
usr/share/doc/pkg/changelog				    pkg
usr/share/doc/pkg/copyright				    pkg" aptftparchive contents incoming/

    rm -rf incoming/*
}

TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"

setupenvironment
test_process_package_with_compression "gzip" "data.tar.gz"
test_process_package_with_compression "none" "data.tar"
test_process_package_with_compression "xz" "data.tar.xz"