]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-712435-missing-descriptions
accept ../ on the cmdline as start for a deb file as well
[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 testsuccessequal "Package: apt-normal
85 $PACKAGESTANZA
86 $DESCRIPTION
87 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
88 " aptcache show apt-normal
89
90 for variant in 'below' 'middle' 'top'; do
91 testsuccessequal "Package: apt-both-$variant
92 $PACKAGESTANZA
93 $TRANSDESCRIPTION
94 Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
95 " aptcache show apt-both-$variant
96 done
97
98 testsuccessequal "Package: apt-trans
99 $PACKAGESTANZA
100 $TRANSDESCRIPTION
101 Description-md5: cccccccccccccccccccccccccccccccc
102 " aptcache show apt-trans
103
104 testsuccessequal "Package: apt-md5
105 $PACKAGESTANZA
106 Description-md5: dddddddddddddddddddddddddddddddd
107 " aptcache show apt-md5
108
109 testsuccessequal "Package: apt-none
110 $PACKAGESTANZA
111 " aptcache show apt-none
112
113 testsuccessequal "Package: apt-intermixed
114 $PACKAGESTANZA
115 $DESCRIPTION
116 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
117 X-Some-Flag: yes
118 " aptcache show apt-intermixed
119
120 testsuccessequal "Package: apt-intermixed2
121 $PACKAGESTANZA
122 $TRANSDESCRIPTION
123 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
124 X-Some-Flag: yes
125 X-Foo-Flag: Something with a Description
126 X-Bar-Flag: no
127 " aptcache show apt-intermixed2
128
129 testsuccessequal "Package: apt-intermixed3
130 $PACKAGESTANZA
131 $TRANSDESCRIPTION
132 Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
133 X-Some-Flag: yes
134 X-Foo-Flag: Something with a Description
135 X-Bar-Flag: no
136 " aptcache show apt-intermixed3
137
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
141 Versions:
142 0.9.7.8 (/tmp/aptarchive_Packages)
143
144
145 Reverse Depends:
146 Dependencies:
147 0.9.7.8 -
148 Provides:
149 0.9.7.8 -
150 Reverse Provides: '
151
152 testempty aptcache search nonexistentstring
153
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