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"
22 # dpkg is installed by our framework
23 testdpkginstalled
'dpkg'
24 testempty aptcache unmet dpkg
26 # FIXME: Find some usecase for unmet as it seems kinda useless/broken
27 #testsuccess aptcache unmet
28 #testsuccess aptcache unmet foo
30 # not too useful to test, but makes coverage green…
31 testsuccess aptcache stats
32 cp rootdir
/tmp
/testsuccess.output stats.output
33 testsuccess
test -s stats.output
34 testsuccess aptcache xvcg foo
35 cp rootdir
/tmp
/testsuccess.output xvcg.output
36 testsuccess
test -s xvcg.output
37 testsuccess aptcache dotty foo
38 cp rootdir
/tmp
/testsuccess.output dotty.output
39 testsuccess
test -s dotty.output
40 # for this, even the sourcecode says it is useless (expect debugging)
41 testsuccess aptcache dump
42 cp rootdir
/tmp
/testsuccess.output dump.output
43 testsuccess
test -s dump.output
45 testsuccessequal
'dpkg
48 foo' aptcache pkgnames
49 testsuccessequal
'bar' aptcache pkgnames bar
50 testsuccessequal
'fancy
51 foo' aptcache pkgnames f
53 testsuccessequal
" foo | 1 | file:$(readlink -f .)/aptarchive/ unstable/main amd64 Packages" aptcache madison foo
62 Conflicts: <foobar:i386>' aptcache depends foo
67 Conflicts: <foobar:i386>' aptcache depends foo
-o APT
::Cache
::ShowOnlyFirstOr
=1
70 |Recommends: <cool> (>= 2)
71 Recommends: <cooler> (<< 5)
73 Conflicts: <foobar:i386>' aptcache depends foo
-o APT
::Cache
::ShowVersion
=1
77 Conflicts: <foobar:i386>' aptcache depends foo
--no-recommends
79 Depends: bar' aptcache depends foo
--important
82 Conflicts: <foobar:i386>' aptcache depends foo
--important --no-depends --conflicts
88 Conflicts: <foobar:i386>
99 <foo:i386>' aptcache depends foo
--recurse
100 testsuccessequal
'foo
106 <foo:i386>' aptcache depends foo
--recurse --important --replaces
110 testsuccessequal
'foo
113 bar' aptcache rdepends foo
114 testsuccessequal
'foo
117 Breaks: bar' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1
118 testsuccessequal
'foo
121 Breaks: bar (<< 1)' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1 -o APT
::Cache
::ShowVersion
=1
122 testsuccessequal
'foo
124 Breaks: bar (<< 1)' aptcache rdepends foo
-o APT
::Cache
::ShowDependencyType
=1 -o APT
::Cache
::ShowVersion
=1 --important --breaks