]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-download
merged the lp:~mvo/apt/mvo branch
[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'
12
13setupaptarchive
14
15testdownload() {
16 msgtest 'Test download of package file' $1
17 if [ -z "$3" ]; then
18 aptget download ${2}
19 else
20 aptget download ${2}/${3}
21 fi
22 test -f $1 && msgpass || msgfail
23}
24
25testdownload apt_1.0_all.deb apt stable
26testdownload apt_2.0_all.deb apt
27
28DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb"
29testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) sha256:$(sha256sum $DEBFILE | cut -d' ' -f 1)" aptget download apt --print-uris