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 testfailureequal
'E: apt-cache stats does not take any arguments' aptcache stats foo
38 testsuccess aptcache xvcg foo
39 cp rootdir
/tmp
/testsuccess.output xvcg.output
40 testsuccess
test -s xvcg.output
41 testsuccess aptcache dotty foo
42 cp rootdir
/tmp
/testsuccess.output dotty.output
43 testsuccess
test -s dotty.output
44 # for this, even the sourcecode says it is useless (expect debugging)
45 testsuccess aptcache dump
46 cp rootdir
/tmp
/testsuccess.output dump.output
47 testsuccess
test -s dump.output
49 testsuccessequal
'dpkg
53 foo' aptcache pkgnames
54 testsuccessequal
'bar' aptcache pkgnames bar
55 testsuccessequal
'fancy
56 foo' aptcache pkgnames f
58 testsuccessequal
" foo | 1 | file:$(readlink -f .)/aptarchive unstable/main amd64 Packages
59 foo | 1 | file:$(readlink -f .)/aptarchive unstable/main i386 Packages" aptcache madison foo
67 Recommends: <cooler>' aptcache depends foo
72 Recommends: <cooler>' aptcache depends foo
--implicit
76 Recommends: <cool>' aptcache depends foo
-o APT
::Cache
::ShowOnlyFirstOr
=1
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 |Recommends: <cool> (>= 2)
90 Recommends: <cooler> (<< 5)' aptcache depends foo
-o APT
::Cache
::ShowVersion
=1 --implicit
93 Conflicts: <foobar>' aptcache depends foo
--no-recommends
96 Conflicts: <foobar>' aptcache depends foo
--no-recommends --implicit
98 Depends: bar' aptcache depends foo
--important --implicit
100 Conflicts: <foobar>' aptcache depends foo
--important --no-depends --conflicts
101 testsuccessequal
'foo
102 Conflicts: <foobar>' aptcache depends foo
--important --no-depends --conflicts --implicit
103 testsuccessequal
'foo
114 <cooler>' aptcache depends foo
--recurse
115 testsuccessequal
'foo
126 <cooler>' aptcache depends foo
--recurse --implicit
127 testsuccessequal
'foo
131 Replaces: foo' aptcache depends foo
--recurse --important --replaces
132 testsuccessequal
'foo
136 Replaces: foo' aptcache depends foo
--recurse --important --replaces --implicit
137 testsuccessequal
'bar
140 Replaces: foo' aptcache depends bar
141 testsuccessequal
'bar
144 Replaces: foo' aptcache depends bar
--implicit
146 testsuccessequal
'specific
148 Depends: <specific:amd64>
151 Replaces: <foo:i386>' aptcache depends specific
152 testsuccessequal
'specific
154 Depends: <specific:amd64>
157 Replaces: <foo:i386>' aptcache depends specific
--implicit
161 # Note that specific does not appear in this list as it doesn't depend on foo,
162 # but on an arch-specific foo!
163 testsuccessequal
'foo
166 bar' aptcache rdepends foo
167 testsuccessequal
'foo
170 Replaces: bar' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1
171 testsuccessequal
'foo
174 Replaces: bar (<< 1)' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1 -o APT
::Cache
::ShowVersion
=1
175 testsuccessequal
'foo
177 Breaks: bar (<< 1)' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1 -o APT
::Cache
::ShowVersion
=1 --important --breaks