]>
Commit | Line | Data |
---|---|---|
42d41ddb DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
10 | buildsimplenativepackage 'apt' 'all' '1.0' 'stable' | |
11 | buildsimplenativepackage 'apt' 'all' '2.0' 'unstable' | |
567785b9 | 12 | insertinstalledpackage 'vrms' 'all' '1.0' |
42d41ddb DK |
13 | |
14 | setupaptarchive | |
15 | ||
16 | testdownload() { | |
2aa7df1d DK |
17 | local APT="$2" |
18 | if [ -n "$3" ]; then | |
19 | APT="${APT}/${3}" | |
42d41ddb | 20 | fi |
2aa7df1d | 21 | msgtest "Test download of package file $1 with" "$APT" |
0954c58e DK |
22 | testsuccess --nomsg aptget download ${APT} |
23 | testsuccess test -f $1 | |
d57f6084 | 24 | rm $1 |
42d41ddb DK |
25 | } |
26 | ||
6ae22905 | 27 | # normal case(es) |
42d41ddb DK |
28 | testdownload apt_1.0_all.deb apt stable |
29 | testdownload apt_2.0_all.deb apt | |
30 | ||
31 | DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb" | |
d57f6084 | 32 | testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) SHA512:$(sha512sum $DEBFILE | cut -d' ' -f 1)" aptget download apt --print-uris |
567785b9 DK |
33 | |
34 | # deb:677887 | |
35 | testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms | |
6ae22905 | 36 | |
e2095426 DK |
37 | # deb:736962 |
38 | testsuccess aptget download apt | |
39 | testsuccess aptget download apt | |
40 | testsuccess test -s apt_2.0_all.deb | |
41 | ||
42 | rm -f apt_1.0_all.deb apt_2.0_all.deb | |
43 | ||
44 | # deb:738103 | |
45 | testsuccess aptget download apt apt apt/unstable apt=2.0 | |
6ae22905 | 46 | testsuccess test -s apt_2.0_all.deb |
8f3594c3 | 47 |