From a537ce19f955f39ee62281bb12bc71a4c67bc635 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 2 Dec 2013 08:01:00 +0100 Subject: first version with test --- test/integration/test-apt-sources-deb822 | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 test/integration/test-apt-sources-deb822 (limited to 'test/integration/test-apt-sources-deb822') diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822 new file mode 100755 index 000000000..cdf30c02a --- /dev/null +++ b/test/integration/test-apt-sources-deb822 @@ -0,0 +1,45 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +BASE="Type: deb +URL: http://ftp.debian.org/debian +Dist: stable +Section: main +Comment: Some random string + that can be very long" + +# simple case +echo "$BASE" > rootdir/etc/apt/sources.list + +testequal "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : +'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : +'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris + + +# Two entries +echo "$BASE" > rootdir/etc/apt/sources.list +echo "" >> rootdir/etc/apt/sources.list +echo "$BASE" | sed s/stable/unstable/ >> rootdir/etc/apt/sources.list + +testequal "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 : +'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : +'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 +'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0 : +'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 : +'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 " aptget update --print-uris + + +# ARCH option +echo "$BASE" > rootdir/etc/apt/sources.list +echo "Arch: amd64,armel" >> rootdir/etc/apt/sources.list + +testequal "'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0 : +'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0 : +'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 : +'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris -- cgit v1.2.3