]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-712435-missing-descriptions
Merge remote-tracking branch 'mvo/feature/apt-show-nice' into debian/experimental...
[apt.git] / test / integration / test-bug-712435-missing-descriptions
CommitLineData
99359751
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'amd64'
8
9PACKAGESTANZA='Version: 0.9.7.8
10Installed-Size: 3270
11Maintainer: APT Development Team <deity@lists.debian.org>
12Architecture: amd64
13Filename: pool/main/a/apt/apt_0.9.7.8_amd64.deb
14MD5sum: 3a622acda41620df50aa22a9fac6f32e'
15
16DESCRIPTION='Description: commandline package manager
17 This APT has Super Cow Powers.'
18
19TRANSDESCRIPTION='Description-en: commandline package manager
20 This APT has translated Super Cow Powers.'
21
22echo "Package: apt-normal
23$PACKAGESTANZA
24$DESCRIPTION
25Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
26
27Package: apt-both-below
28$PACKAGESTANZA
29$DESCRIPTION
30$TRANSDESCRIPTION
31Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
32
33Package: apt-both-middle
34$PACKAGESTANZA
35$DESCRIPTION
36Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
37$TRANSDESCRIPTION
38
39Package: apt-both-top
40$PACKAGESTANZA
41Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
42$DESCRIPTION
43$TRANSDESCRIPTION
44
45Package: apt-trans
46$PACKAGESTANZA
47$TRANSDESCRIPTION
48Description-md5: cccccccccccccccccccccccccccccccc
49
50Package: apt-md5
51$PACKAGESTANZA
52Description-md5: dddddddddddddddddddddddddddddddd
53
54Package: apt-none
61843f53
DK
55$PACKAGESTANZA
56
57Package: apt-intermixed
58$PACKAGESTANZA
59$DESCRIPTION
60X-Some-Flag: yes
61Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
62
63Package: apt-intermixed2
64$PACKAGESTANZA
65$DESCRIPTION
66X-Some-Flag: yes
67$TRANSDESCRIPTION
68X-Foo-Flag: Something with a Description
69Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
70X-Bar-Flag: no
71
72Package: apt-intermixed3
73$PACKAGESTANZA
74$DESCRIPTION
75X-Some-Flag: yes
76$TRANSDESCRIPTION
77X-Foo-Flag: Something with a Description
78X-Bar-Flag: no
79Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > aptarchive/Packages
80
99359751
DK
81
82setupaptarchive
83
84testequal "Package: apt-normal
85$PACKAGESTANZA
86$DESCRIPTION
87Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
88" aptcache show apt-normal
89
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.
93for variant in 'below' 'middle' 'top'; do
94 testequal "Package: apt-both-$variant
95$PACKAGESTANZA
96$DESCRIPTION
97Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
98" aptcache show apt-both-$variant
99done
100
101testequal "Package: apt-trans
102$PACKAGESTANZA
103$TRANSDESCRIPTION
104Description-md5: cccccccccccccccccccccccccccccccc
105" aptcache show apt-trans
106
107testequal "Package: apt-md5
108$PACKAGESTANZA
109Description-md5: dddddddddddddddddddddddddddddddd
110" aptcache show apt-md5
111
112testequal "Package: apt-none
113$PACKAGESTANZA
114" aptcache show apt-none
61843f53
DK
115
116testequal "Package: apt-intermixed
117$PACKAGESTANZA
118$DESCRIPTION
119Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
120X-Some-Flag: yes
121" aptcache show apt-intermixed
122
123testequal "Package: apt-intermixed2
124$PACKAGESTANZA
125$DESCRIPTION
126Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
127X-Some-Flag: yes
128X-Foo-Flag: Something with a Description
129X-Bar-Flag: no
130" aptcache show apt-intermixed2
131
132testequal "Package: apt-intermixed3
133$PACKAGESTANZA
134$DESCRIPTION
135Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
136X-Some-Flag: yes
137X-Foo-Flag: Something with a Description
138X-Bar-Flag: no
139" aptcache show apt-intermixed3
922f0798
DK
140
141msgtest 'Test that no description does not destroy' 'showpkg'
142aptcache showpkg apt-none | sed 's#/tmp/.*_aptarchive_#/tmp/aptarchive_#' >showpkg.explosion && msgpass || msgfail
143testfileequal showpkg.explosion 'Package: apt-none
144Versions:
1450.9.7.8 (/tmp/aptarchive_Packages)
146
147
148Reverse Depends:
149Dependencies:
1500.9.7.8 -
151Provides:
1520.9.7.8 -
153Reverse Provides: '
154
155testempty aptcache search nonexistentstring
156
157# packages without a description can't be found
158testequal 'apt-normal - commandline package manager
159apt-both-below - commandline package manager
160apt-both-middle - commandline package manager
161apt-both-top - commandline package manager
162apt-trans - commandline package manager
163apt-intermixed - commandline package manager
164apt-intermixed2 - commandline package manager
165apt-intermixed3 - commandline package manager' aptcache search apt