4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64'
9 PACKAGESTANZA
='Version: 0.9.7.8
11 Maintainer: APT Development Team <deity@lists.debian.org>
13 Filename: pool/main/a/apt/apt_0.9.7.8_amd64.deb
14 MD5sum: 3a622acda41620df50aa22a9fac6f32e'
16 DESCRIPTION
='Description: commandline package manager
17 This APT has Super Cow Powers.'
19 TRANSDESCRIPTION
='Description-en: commandline package manager
20 This APT has translated Super Cow Powers.'
22 echo "Package: apt-normal
25 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
27 Package: apt-both-below
31 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
33 Package: apt-both-middle
36 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
41 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
48 Description-md5: cccccccccccccccccccccccccccccccc
52 Description-md5: dddddddddddddddddddddddddddddddd
57 Package: apt-intermixed
61 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
63 Package: apt-intermixed2
68 X-Foo-Flag: Something with a Description
69 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
72 Package: apt-intermixed3
77 X-Foo-Flag: Something with a Description
79 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > aptarchive
/Packages
84 testsuccessequal
"Package: apt-normal
87 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
88 " aptcache show apt
-normal
90 for variant
in 'below' 'middle' 'top'; do
91 testsuccessequal
"Package: apt-both-$variant
94 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
95 " aptcache show apt
-both-$variant
98 testsuccessequal
"Package: apt-trans
101 Description-md5: cccccccccccccccccccccccccccccccc
102 " aptcache show apt
-trans
104 testsuccessequal
"Package: apt-md5
106 Description-md5: dddddddddddddddddddddddddddddddd
107 " aptcache show apt
-md5
109 testsuccessequal
"Package: apt-none
111 " aptcache show apt
-none
113 testsuccessequal
"Package: apt-intermixed
116 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
118 " aptcache show apt
-intermixed
120 testsuccessequal
"Package: apt-intermixed2
123 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
125 X-Foo-Flag: Something with a Description
127 " aptcache show apt
-intermixed2
129 testsuccessequal
"Package: apt-intermixed3
132 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
134 X-Foo-Flag: Something with a Description
136 " aptcache show apt
-intermixed3
138 msgtest
'Test that no description does not destroy' 'showpkg'
139 aptcache showpkg apt
-none | sed 's#/tmp/.*_aptarchive_#/tmp/aptarchive_#' >showpkg.explosion
&& msgpass
|| msgfail
140 testfileequal showpkg.explosion
'Package: apt-none
142 0.9.7.8 (/tmp/aptarchive_Packages)
152 testempty aptcache search nonexistentstring
154 # packages without a description can't be found
155 testsuccessequal
'apt-normal - commandline package manager
156 apt-both-below - commandline package manager
157 apt-both-middle - commandline package manager
158 apt-both-top - commandline package manager
159 apt-trans - commandline package manager
160 apt-intermixed - commandline package manager
161 apt-intermixed2 - commandline package manager
162 apt-intermixed3 - commandline package manager' aptcache search apt