4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
'amd64' 'i386'
10 DESCR
='Some description
11 That has multiple lines'
12 insertpackage
'unstable' 'fancy' 'all' '1'
13 insertpackage
'unstable,installed' 'foo' 'all' '1' 'Depends: bar
15 Recommends: cool (>= 2) | cooler (<< 5)' "$DESCR"
16 insertpackage
'unstable' 'bar' 'all' '1' 'Depends: bar
18 Replaces: foo (<< 1)' "$DESCR"
19 insertpackage
'unstable' 'specific' 'all' '1' 'Depends: bar:i386, specific:amd64
20 Breaks: foo:amd64 (<< 1)
21 Replaces: foo:i386 (<< 1)' "$DESCR"
25 # dpkg is installed by our framework
26 testdpkginstalled
'dpkg'
27 testempty aptcache unmet dpkg
29 # FIXME: Find some usecase for unmet as it seems kinda useless/broken
30 #testsuccess aptcache unmet
31 #testsuccess aptcache unmet foo
33 # not too useful to test, but makes coverage green…
34 testsuccess aptcache stats
35 cp rootdir
/tmp
/testsuccess.output stats.output
36 testsuccess
test -s stats.output
37 testsuccess aptcache xvcg foo
38 cp rootdir
/tmp
/testsuccess.output xvcg.output
39 testsuccess
test -s xvcg.output
40 testsuccess aptcache dotty foo
41 cp rootdir
/tmp
/testsuccess.output dotty.output
42 testsuccess
test -s dotty.output
43 # for this, even the sourcecode says it is useless (expect debugging)
44 testsuccess aptcache dump
45 cp rootdir
/tmp
/testsuccess.output dump.output
46 testsuccess
test -s dump.output
48 testsuccessequal
'dpkg
52 foo' aptcache pkgnames
53 testsuccessequal
'bar' aptcache pkgnames bar
54 testsuccessequal
'fancy
55 foo' aptcache pkgnames f
57 testsuccessequal
" foo | 1 | file:$(readlink -f .)/aptarchive unstable/main amd64 Packages" aptcache madison foo
65 Recommends: <cooler>' aptcache depends foo
69 Conflicts: <foobar:i386>
71 Recommends: <cooler>' aptcache depends foo
--implicit
75 Recommends: <cool>' aptcache depends foo
-o APT
::Cache
::ShowOnlyFirstOr
=1
79 Conflicts: <foobar:i386>
80 Recommends: <cool>' aptcache depends foo
-o APT
::Cache
::ShowOnlyFirstOr
=1 --implicit
84 |Recommends: <cool> (>= 2)
85 Recommends: <cooler> (<< 5)' aptcache depends foo
-o APT
::Cache
::ShowVersion
=1
89 Conflicts: <foobar:i386>
90 |Recommends: <cool> (>= 2)
91 Recommends: <cooler> (<< 5)' aptcache depends foo
-o APT
::Cache
::ShowVersion
=1 --implicit
94 Conflicts: <foobar>' aptcache depends foo
--no-recommends
98 Conflicts: <foobar:i386>' aptcache depends foo
--no-recommends --implicit
100 Depends: bar' aptcache depends foo
--important --implicit
101 testsuccessequal
'foo
102 Conflicts: <foobar>' aptcache depends foo
--important --no-depends --conflicts
103 testsuccessequal
'foo
105 Conflicts: <foobar:i386>' aptcache depends foo
--important --no-depends --conflicts --implicit
106 testsuccessequal
'foo
117 <cooler>' aptcache depends foo
--recurse
118 testsuccessequal
'foo
121 Conflicts: <foobar:i386>
134 <foo:i386>' aptcache depends foo
--recurse --implicit
135 testsuccessequal
'foo
139 Replaces: foo' aptcache depends foo
--recurse --important --replaces
140 testsuccessequal
'foo
146 <foo:i386>' aptcache depends foo
--recurse --important --replaces --implicit
147 testsuccessequal
'bar
150 Replaces: foo' aptcache depends bar
151 testsuccessequal
'bar
156 Replaces: <foo:i386>' aptcache depends bar
--implicit
157 testsuccessequal
'specific
159 Depends: specific:amd64
161 Replaces: <foo:i386>' aptcache depends specific
162 testsuccessequal
'specific
164 Depends: specific:amd64
166 Replaces: <foo:i386>' aptcache depends specific
--implicit
170 testsuccessequal
'foo
174 bar' aptcache rdepends foo
175 testsuccessequal
'foo
179 Replaces: bar' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1
180 testsuccessequal
'foo
183 Breaks: specific (<< 1)
184 Replaces: bar (<< 1)' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1 -o APT
::Cache
::ShowVersion
=1
185 testsuccessequal
'foo
188 Breaks: specific (<< 1)' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1 -o APT
::Cache
::ShowVersion
=1 --important --breaks