]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-bug-712435-missing-descriptions
Merge branch 'debian/sid' into debian/experimental
[apt.git] / test / integration / test-bug-712435-missing-descriptions
index 9b3c2ee50443ff4f4e8ef77d1762dbd40af737f3..7a35187452482e209557d3032c87be4ed5679ac4 100755 (executable)
@@ -52,7 +52,32 @@ $PACKAGESTANZA
 Description-md5: dddddddddddddddddddddddddddddddd
 
 Package: apt-none
 Description-md5: dddddddddddddddddddddddddddddddd
 
 Package: apt-none
-$PACKAGESTANZA" > aptarchive/Packages
+$PACKAGESTANZA
+
+Package: apt-intermixed
+$PACKAGESTANZA
+$DESCRIPTION
+X-Some-Flag: yes
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+Package: apt-intermixed2
+$PACKAGESTANZA
+$DESCRIPTION
+X-Some-Flag: yes
+$TRANSDESCRIPTION
+X-Foo-Flag: Something with a Description
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Bar-Flag: no
+
+Package: apt-intermixed3
+$PACKAGESTANZA
+$DESCRIPTION
+X-Some-Flag: yes
+$TRANSDESCRIPTION
+X-Foo-Flag: Something with a Description
+X-Bar-Flag: no
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > aptarchive/Packages
+
 
 setupaptarchive
 
 
 setupaptarchive
 
@@ -62,13 +87,10 @@ $DESCRIPTION
 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 " aptcache show apt-normal
 
 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 " aptcache show apt-normal
 
-# displaying the translated Description would be equally valid,
-# but we assume only one description is in a Packages file and
-# so we prefer "Description" over "Description-*" currently.
 for variant in 'below' 'middle' 'top'; do
        testequal "Package: apt-both-$variant
 $PACKAGESTANZA
 for variant in 'below' 'middle' 'top'; do
        testequal "Package: apt-both-$variant
 $PACKAGESTANZA
-$DESCRIPTION
+$TRANSDESCRIPTION
 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 " aptcache show apt-both-$variant
 done
 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 " aptcache show apt-both-$variant
 done
@@ -87,3 +109,54 @@ Description-md5: dddddddddddddddddddddddddddddddd
 testequal "Package: apt-none
 $PACKAGESTANZA
 " aptcache show apt-none
 testequal "Package: apt-none
 $PACKAGESTANZA
 " aptcache show apt-none
+
+testequal "Package: apt-intermixed
+$PACKAGESTANZA
+$DESCRIPTION
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Some-Flag: yes
+" aptcache show apt-intermixed
+
+testequal "Package: apt-intermixed2
+$PACKAGESTANZA
+$TRANSDESCRIPTION
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Some-Flag: yes
+X-Foo-Flag: Something with a Description
+X-Bar-Flag: no
+" aptcache show apt-intermixed2
+
+testequal "Package: apt-intermixed3
+$PACKAGESTANZA
+$TRANSDESCRIPTION
+Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+X-Some-Flag: yes
+X-Foo-Flag: Something with a Description
+X-Bar-Flag: no
+" aptcache show apt-intermixed3
+
+msgtest 'Test that no description does not destroy' 'showpkg'
+aptcache showpkg apt-none | sed 's#/tmp/.*_aptarchive_#/tmp/aptarchive_#' >showpkg.explosion && msgpass || msgfail
+testfileequal showpkg.explosion 'Package: apt-none
+Versions: 
+0.9.7.8 (/tmp/aptarchive_Packages)
+
+
+Reverse Depends: 
+Dependencies: 
+0.9.7.8 - 
+Provides: 
+0.9.7.8 - 
+Reverse Provides: '
+
+testempty aptcache search nonexistentstring
+
+# packages without a description can't be found
+testequal 'apt-normal - commandline package manager
+apt-both-below - commandline package manager
+apt-both-middle - commandline package manager
+apt-both-top - commandline package manager
+apt-trans - commandline package manager
+apt-intermixed - commandline package manager
+apt-intermixed2 - commandline package manager
+apt-intermixed3 - commandline package manager' aptcache search apt