summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-16 21:40:58 +0100
committerMichael Vogt <mvo@debian.org>2014-01-16 21:40:58 +0100
commit2f0ae309be91f0a4d92c32b815f5f8ae10ab3221 (patch)
tree74e51f9c12931e32f9a9e7b3e6b640b0e6f298dc /test
parent15b6fc7e20e2d097982f50df89fcae71ffc61480 (diff)
parent78766f46d043c1c1eeb9869db7e1c5b4093d5274 (diff)
merged mvo/feature/deb822
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-sources-deb82231
-rw-r--r--test/libapt/sourcelist_test.cc8
2 files changed, 19 insertions, 20 deletions
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index 8c022767f..758ae5ae3 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -13,8 +13,8 @@ BASE='# some comment
#Type: meep
Type: deb
-URL: http://ftp.debian.org/debian
-Dist: stable
+Uri: http://ftp.debian.org/debian
+Suite: stable
Section: main
Comment: Some random string
that can be very long'
@@ -26,7 +26,6 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/P
'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
-
msgtest 'Test simple deb822 sources.list'
echo "$BASE" > $SOURCES
testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
@@ -35,7 +34,7 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/P
msgtest 'Test deb822 with two sections' 'seperated by comma'
-echo "$BASE" | sed 's/main/main,contrib/' > $SOURCES
+echo "$BASE" | sed 's/main/main contrib/' > $SOURCES
testequal --nomsg "'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/contrib/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_contrib_binary-i386_Packages 0 :
'http://ftp.debian.org/debian/dists/stable/contrib/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_contrib_i18n_Translation-en 0 :
@@ -43,17 +42,8 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/P
'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 " aptget update --print-uris
-# FIXME: Advertised, but not supported at the moment
-#msgtest 'Test deb822 with two sections' 'seperated by space'
-#echo "$BASE" | sed 's/main/main contrib/' > $SOURCES
-#testequal --nomsg "'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/contrib/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_contrib_binary-i386_Packages 0 :
-#'http://ftp.debian.org/debian/dists/stable/contrib/i18n/Translation-en.bz2' ftp.debian.org_debian_dists_stable_contrib_i18n_Translation-en 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
-
-
msgtest 'Test deb822 with' 'two entries'
+# Two entries
echo "$BASE" > $SOURCES
echo "" >> $SOURCES
echo "$BASE" | sed s/stable/unstable/ >> $SOURCES
@@ -64,10 +54,19 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/P
'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
+# two suite entries
+msgtest 'Test deb822 with' 'two Suite entries'
+echo "$BASE" | sed -e "s/stable/stable unstable/" > $SOURCES
+testequal --nomsg "'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
msgtest 'Test deb822' 'architecture option'
echo "$BASE" > $SOURCES
-echo "Arch: amd64,armel" >> $SOURCES
+echo "Architectures: amd64,armel" >> $SOURCES
testequal --nomsg "'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 :
@@ -82,7 +81,7 @@ E: The list of sources could not be read." aptget update --print-uris
msgtest 'Test deb822 sources.list file which has' 'malformed URI'
echo "Type: deb
-Dist: stable
+Suite: stable
" > $SOURCES
testequal --nomsg "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
E: The list of sources could not be read." aptget update --print-uris
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index adadae6a7..bf61746c4 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -23,15 +23,15 @@ int main(int argc, char *argv[])
{
const char contents[] = ""
"Type: deb\n"
- "URL: http://ftp.debian.org/debian\n"
- "Dist: stable\n"
+ "Uri: http://ftp.debian.org/debian\n"
+ "Suite: stable\n"
"Section: main\n"
"Comment: Some random string\n"
" that can be very long\n"
"\n"
"Type: deb\n"
- "URL: http://ftp.debian.org/debian\n"
- "Dist: unstable\n"
+ "Uri: http://ftp.debian.org/debian\n"
+ "Suite: unstable\n"
"Section: main non-free\n"
;