]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-712435-missing-descriptions
properly format multiline error messages
[apt.git] / test / integration / test-bug-712435-missing-descriptions
... / ...
CommitLineData
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
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
81
82setupaptarchive
83
84testsuccessequal "Package: apt-normal
85$PACKAGESTANZA
86$DESCRIPTION
87Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
88" aptcache show apt-normal
89
90for variant in 'below' 'middle' 'top'; do
91 testsuccessequal "Package: apt-both-$variant
92$PACKAGESTANZA
93$TRANSDESCRIPTION
94Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
95" aptcache show apt-both-$variant
96done
97
98testsuccessequal "Package: apt-trans
99$PACKAGESTANZA
100$TRANSDESCRIPTION
101Description-md5: cccccccccccccccccccccccccccccccc
102" aptcache show apt-trans
103
104testsuccessequal "Package: apt-md5
105$PACKAGESTANZA
106Description-md5: dddddddddddddddddddddddddddddddd
107" aptcache show apt-md5
108
109testsuccessequal "Package: apt-none
110$PACKAGESTANZA
111" aptcache show apt-none
112
113testsuccessequal "Package: apt-intermixed
114$PACKAGESTANZA
115$DESCRIPTION
116Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
117X-Some-Flag: yes
118" aptcache show apt-intermixed
119
120testsuccessequal "Package: apt-intermixed2
121$PACKAGESTANZA
122$TRANSDESCRIPTION
123Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
124X-Some-Flag: yes
125X-Foo-Flag: Something with a Description
126X-Bar-Flag: no
127" aptcache show apt-intermixed2
128
129testsuccessequal "Package: apt-intermixed3
130$PACKAGESTANZA
131$TRANSDESCRIPTION
132Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
133X-Some-Flag: yes
134X-Foo-Flag: Something with a Description
135X-Bar-Flag: no
136" aptcache show apt-intermixed3
137
138msgtest 'Test that no description does not destroy' 'showpkg'
139aptcache showpkg apt-none | sed 's#/tmp/.*_aptarchive_#/tmp/aptarchive_#' >showpkg.explosion && msgpass || msgfail
140testfileequal showpkg.explosion 'Package: apt-none
141Versions:
1420.9.7.8 (/tmp/aptarchive_Packages)
143
144
145Reverse Depends:
146Dependencies:
1470.9.7.8 -
148Provides:
1490.9.7.8 -
150Reverse Provides: '
151
152testempty aptcache search nonexistentstring
153
154# packages without a description can't be found
155testsuccessequal 'apt-normal - commandline package manager
156apt-both-below - commandline package manager
157apt-both-middle - commandline package manager
158apt-both-top - commandline package manager
159apt-trans - commandline package manager
160apt-intermixed - commandline package manager
161apt-intermixed2 - commandline package manager
162apt-intermixed3 - commandline package manager' aptcache search apt