]> git.saurik.com Git - apt.git/commitdiff
Merge remote-tracking branch 'mvo/feature/source-deb822' into debian/experimental...
authorMichael Vogt <mvo@debian.org>
Sat, 18 Jan 2014 20:05:24 +0000 (21:05 +0100)
committerMichael Vogt <mvo@debian.org>
Sat, 18 Jan 2014 20:05:24 +0000 (21:05 +0100)
1  2 
test/integration/test-apt-sources-deb822
test/libapt/sourcelist_test.cc

index a3855496c5b1b30608ac75e354bdda6024b0a8b2,c73b942d433a781859c7e2d78776b56129b7ae3d..6e9a02417c5c64b8134948f9b4918ea0b8474c42
@@@ -14,35 -21,18 +14,35 @@@ BASE='# some commen
  
  Type: deb
  URI: http://ftp.debian.org/debian
- Suite: stable
- Section: main
+ Suites: stable
+ Sections: main
  Comment: Some random string
 - that can be very long"
 + that can be very long'
 +
  
 -# simple case
 +msgtest 'Test old-style sources.list'
 +echo "deb http://ftp.debian.org/debian stable main" > $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 "  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 :
 +'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
 +
  
 -testequalwithmsg "Simple deb822 sources.list works" "'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.bz2' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 :
 +msgtest 'Test deb822 with two sections' 'seperated by comma'
 +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 
 +'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
@@@ -72,16 -63,15 +72,16 @@@ testequal --nomsg "'http://ftp.debian.o
  '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
  
 -# invalid sources.list file
 -echo "deb http://ftp.debian.org" > $SOURCES
  
 -testequalwithmsg "Invalid sources.list file gives proper error" "E: Malformed line 1 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (dist)
 +msgtest 'Test old-style sources.list file which has' 'malformed dist'
 +echo "deb http://ftp.debian.org" > $SOURCES
 +testequal --nomsg "E: Malformed line 1 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (dist)
  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
- Suite: stable
+ Suites: stable
  " > $SOURCES
 -
 -testequalwithmsg "Invalid deb822 sources.list file gives proper error" "E: Malformed stanza 0 in source list $TMPWORKINGDIRECTORY/rootdir/etc/apt/sources.list (URI parse)
 +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
Simple merge