From 76e2632459410dec81337edb6a9fee33c9a660f3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 11:59:37 +0200 Subject: Adding upstream version 2.7.12. Signed-off-by: Daniel Baumann --- .../test-bug-712435-missing-descriptions | 162 +++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100755 test/integration/test-bug-712435-missing-descriptions (limited to 'test/integration/test-bug-712435-missing-descriptions') diff --git a/test/integration/test-bug-712435-missing-descriptions b/test/integration/test-bug-712435-missing-descriptions new file mode 100755 index 0000000..c231993 --- /dev/null +++ b/test/integration/test-bug-712435-missing-descriptions @@ -0,0 +1,162 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +PACKAGESTANZA='Version: 0.9.7.8 +Installed-Size: 3270 +Maintainer: APT Development Team +Architecture: amd64 +Filename: pool/main/a/apt/apt_0.9.7.8_amd64.deb +MD5sum: 3a622acda41620df50aa22a9fac6f32e' + +DESCRIPTION='Description: commandline package manager + This APT has Super Cow Powers.' + +TRANSDESCRIPTION='Description-en: commandline package manager + This APT has translated Super Cow Powers.' + +echo "Package: apt-normal +$PACKAGESTANZA +$DESCRIPTION +Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +Package: apt-both-below +$PACKAGESTANZA +$DESCRIPTION +$TRANSDESCRIPTION +Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + +Package: apt-both-middle +$PACKAGESTANZA +$DESCRIPTION +Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +$TRANSDESCRIPTION + +Package: apt-both-top +$PACKAGESTANZA +Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +$DESCRIPTION +$TRANSDESCRIPTION + +Package: apt-trans +$PACKAGESTANZA +$TRANSDESCRIPTION +Description-md5: cccccccccccccccccccccccccccccccc + +Package: apt-md5 +$PACKAGESTANZA +Description-md5: dddddddddddddddddddddddddddddddd + +Package: apt-none +$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 + +testsuccessequal "Package: apt-normal +$PACKAGESTANZA +$DESCRIPTION +Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +" aptcache show apt-normal + +for variant in 'below' 'middle' 'top'; do + testsuccessequal "Package: apt-both-$variant +$PACKAGESTANZA +$TRANSDESCRIPTION +Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +" aptcache show apt-both-$variant +done + +testsuccessequal "Package: apt-trans +$PACKAGESTANZA +$TRANSDESCRIPTION +Description-md5: cccccccccccccccccccccccccccccccc +" aptcache show apt-trans + +testsuccessequal "Package: apt-md5 +$PACKAGESTANZA +Description-md5: dddddddddddddddddddddddddddddddd +" aptcache show apt-md5 + +testsuccessequal "Package: apt-none +$PACKAGESTANZA +" aptcache show apt-none + +testsuccessequal "Package: apt-intermixed +$PACKAGESTANZA +$DESCRIPTION +Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +X-Some-Flag: yes +" aptcache show apt-intermixed + +testsuccessequal "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 + +testsuccessequal "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 +testsuccessequal '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 -- cgit v1.2.3