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 testequal
"Package: apt-normal
87 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
88 " aptcache show apt
-normal
90 # displaying the translated Description would be equally valid,
91 # but we assume only one description is in a Packages file and
92 # so we prefer "Description" over "Description-*" currently.
93 for variant
in 'below' 'middle' 'top'; do
94 testequal
"Package: apt-both-$variant
97 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
98 " aptcache show apt
-both-$variant
101 testequal
"Package: apt-trans
104 Description-md5: cccccccccccccccccccccccccccccccc
105 " aptcache show apt
-trans
107 testequal
"Package: apt-md5
109 Description-md5: dddddddddddddddddddddddddddddddd
110 " aptcache show apt
-md5
112 testequal
"Package: apt-none
114 " aptcache show apt
-none
116 testequal
"Package: apt-intermixed
119 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
121 " aptcache show apt
-intermixed
123 testequal
"Package: apt-intermixed2
126 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
128 X-Foo-Flag: Something with a Description
130 " aptcache show apt
-intermixed2
132 testequal
"Package: apt-intermixed3
135 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
137 X-Foo-Flag: Something with a Description
139 " aptcache show apt
-intermixed3
141 msgtest
'Test that no description does not destroy' 'showpkg'
142 aptcache showpkg apt
-none | sed 's#/tmp/.*_aptarchive_#/tmp/aptarchive_#' >showpkg.explosion
&& msgpass
|| msgfail
143 testfileequal showpkg.explosion
'Package: apt-none
145 0.9.7.8 (/tmp/aptarchive_Packages)
155 testempty aptcache search nonexistentstring
157 # packages without a description can't be found
158 testequal
'apt-normal - commandline package manager
159 apt-both-below - commandline package manager
160 apt-both-middle - commandline package manager
161 apt-both-top - commandline package manager
162 apt-trans - commandline package manager
163 apt-intermixed - commandline package manager
164 apt-intermixed2 - commandline package manager
165 apt-intermixed3 - commandline package manager' aptcache search apt