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