]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-cli-list
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]
26 foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
28 testsuccessequal
"Listing...
30 foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
"foo*"
32 testsuccessequal
"Listing...
33 baz/unstable 2.0 all [upgradable from: 0.1]
34 foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
--upgradable
36 # FIXME: hm, hm - does it make sense to have this different? shouldn't
37 # we use "installed,upgradable" consitently?
38 testsuccessequal
"Listing...
39 bar/now 1.0 i386 [installed,local]
40 baz/now 0.1 all [installed,upgradable to: 2.0]
41 foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list
--installed
43 testsuccessequal
"Listing...
44 bar/now 1.0 i386 [installed,local]
46 foobar/unstable 2.0 i386 [upgradable from: 1.0]
47 foobar/now 1.0 i386 [installed,upgradable to: 2.0]
48 " apt list bar foobar
--all-versions
50 testsuccessequal
"Listing...
51 bar/now 1.0 i386 [installed,local]
52 an autogenerated dummy bar=1.0/installed
53 " apt list bar
--verbose
55 # test for dpkg ^rc state
56 insertinstalledpackage
'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files'
57 testsuccessequal
"Listing...
58 conf-only/now 1.0 i386 [residual-config]" apt list conf
-only
60 # ensure that the users learns about multiple versions too
61 testsuccessequal
"Listing...
62 baz/unstable 2.0 all [upgradable from: 0.1]
63 N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz
-o quiet
=0
64 testsuccessequal
'Listing...
65 baz/unstable 2.0 all [upgradable from: 0.1]
67 baz/now 0.1 all [installed,upgradable to: 2.0]
68 ' apt list baz
-o quiet
=0 -a
70 # test format strings for machine parseable output
71 testsuccessequal
'bar - 1.0 - 1.0
72 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}"