]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-download
add missing test/integration/test-bug-720597-build-dep-purge
[apt.git] / test / integration / test-apt-get-download
CommitLineData
42d41ddb
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
10buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
11buildsimplenativepackage 'apt' 'all' '2.0' 'unstable'
567785b9 12insertinstalledpackage 'vrms' 'all' '1.0'
42d41ddb
DK
13
14setupaptarchive
15
16testdownload() {
2aa7df1d
DK
17 local APT="$2"
18 if [ -n "$3" ]; then
19 APT="${APT}/${3}"
42d41ddb 20 fi
2aa7df1d
DK
21 msgtest "Test download of package file $1 with" "$APT"
22 aptget -qq download ${APT} && test -f $1 && msgpass || msgfail
d57f6084 23 rm $1
42d41ddb
DK
24}
25
26testdownload apt_1.0_all.deb apt stable
27testdownload apt_2.0_all.deb apt
28
29DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb"
d57f6084 30testequal "'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
31
32# deb:677887
33testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms