28
28
APTARCHIVE=$(readlink -f ./aptarchive)
30
testsuccessequal "Listing...
31
31
bar/now 1.0 i386 [installed,local]
32
32
baz/unstable 2.0 all [upgradable from: 0.1]
33
33
foo/unstable 1.0 all
34
34
foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
36
testsuccessequal "Listing...
37
37
foo/unstable 1.0 all
38
38
foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*"
40
testsuccessequal "Listing...
41
41
baz/unstable 2.0 all [upgradable from: 0.1]
42
42
foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable
44
44
# FIXME: hm, hm - does it make sense to have this different? shouldn't
45
45
# we use "installed,upgradable" consitently?
46
testsuccessequal "Listing...
47
47
bar/now 1.0 i386 [installed,local]
48
48
baz/now 0.1 all [installed,upgradable to: 2.0]
49
49
foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed
51
testsuccessequal "Listing...
52
52
bar/now 1.0 i386 [installed,local]
54
54
foobar/unstable 2.0 i386 [upgradable from: 1.0]
55
55
foobar/now 1.0 i386 [installed,upgradable to: 2.0]
56
56
" apt list bar foobar --all-versions
58
testsuccessequal "Listing...
59
59
bar/now 1.0 i386 [installed,local]
60
60
an autogenerated dummy bar=1.0/installed
61
61
" apt list bar --verbose
63
63
# test for dpkg ^rc state
64
64
insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files'
65
testsuccessequal "Listing...
66
66
conf-only/now 1.0 i386 [residual-config]" apt list conf-only
68
68
# ensure that the users learns about multiple versions too
69
testsuccessequal "Listing...
70
70
baz/unstable 2.0 all [upgradable from: 0.1]
71
71
N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0
73
73
# test format strings for machine parseable output
74
apt list -qq bar baz -o APT::Cmd::use-format=true -o APT::Cmd::format="\${Package} - \${installed:Version} - \${candidate:Version}" > output.txt
75
testequal "bar - 1.0 - 1.0
76
baz - 0.1 - 2.0" cat output.txt
74
testsuccessequal 'bar - 1.0 - 1.0
75
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}"