4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture "i386
"
10 insertpackage 'unstable' 'foo' 'all' '1.0'
11 insertinstalledpackage 'bar' 'i386' '1.0'
13 insertinstalledpackage 'foobar' 'i386' '1.0'
14 insertpackage 'unstable' 'foobar' 'i386' '2.0'
16 insertinstalledpackage 'baz' 'all' '0.1'
17 insertpackage 'testing' 'baz' 'all' '1.0'
18 insertpackage 'unstable' 'baz' 'all' '2.0'
22 testsuccessequal "Listing...
23 bar
/now
1.0 i386
[installed
,local]
24 baz
/unstable
2.0 all
[upgradable from
: 0.1]
25 dpkg
/now
1.16.2+fake all
[installed
,local]
27 foobar
/unstable
2.0 i386
[upgradable from
: 1.0]" apt list
29 testsuccessequal "Listing...
31 foobar
/unstable
2.0 i386
[upgradable from
: 1.0]" apt list "foo
*"
33 testsuccessequal "Listing...
34 baz
/unstable
2.0 all
[upgradable from
: 0.1]
35 foobar
/unstable
2.0 i386
[upgradable from
: 1.0]" apt list --upgradable
37 # FIXME: hm, hm - does it make sense to have this different? shouldn't
38 # we use "installed
,upgradable
" consitently?
39 testsuccessequal "Listing...
40 bar
/now
1.0 i386
[installed
,local]
41 baz
/now
0.1 all
[installed
,upgradable to
: 2.0]
42 dpkg
/now
1.16.2+fake all
[installed
,local]
43 foobar
/now
1.0 i386
[installed
,upgradable to
: 2.0]" apt list --installed
45 testsuccessequal "Listing...
46 bar
/now
1.0 i386
[installed
,local]
48 foobar
/unstable
2.0 i386
[upgradable from
: 1.0]
49 foobar
/now
1.0 i386
[installed
,upgradable to
: 2.0]
50 " apt list bar foobar --all-versions
52 testsuccessequal "Listing...
53 bar
/now
1.0 i386
[installed
,local]
54 an autogenerated dummy bar
=1.0/installed
55 " apt list bar --verbose
57 # test for dpkg ^rc state
58 insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files'
59 testsuccessequal "Listing...
60 conf
-only/now
1.0 i386
[residual
-config]" apt list conf-only
62 # ensure that the users learns about multiple versions too
63 testsuccessequal "Listing...
64 baz
/unstable
2.0 all
[upgradable from
: 0.1]
65 N
: There are
2 additional versions. Please use the
'-a' switch to see them.
" apt list baz -o quiet=0
66 testsuccessequal 'Listing...
67 baz/unstable 2.0 all [upgradable from: 0.1]
69 baz/now 0.1 all [installed,upgradable to: 2.0]
70 ' apt list baz -o quiet=0 -a
72 # test format strings for machine parseable output
73 testsuccessequal 'bar - 1.0 - 1.0
74 baz - 0.1 - 2.0' apt list -qq bar baz -o APT::Cmd::use-format=true -o APT::Cmd::format="\
${Package} - \
${installed:Version} - \
${candidate:Version}"