]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-apt-cli-list
Don't download "optional" files not in Release :/.
[apt.git] / test / integration / test-apt-cli-list
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6
7setupenvironment
8configarchitecture "i386"
9
10insertpackage 'unstable' 'foo' 'all' '1.0'
11insertinstalledpackage 'bar' 'i386' '1.0'
12
13insertinstalledpackage 'foobar' 'i386' '1.0'
14insertpackage 'unstable' 'foobar' 'i386' '2.0'
15
16insertinstalledpackage 'baz' 'all' '0.1'
17insertpackage 'testing' 'baz' 'all' '1.0'
18insertpackage 'unstable' 'baz' 'all' '2.0'
19
20setupaptarchive
21
22testsuccessequal "Listing...
23bar/now 1.0 i386 [installed,local]
24baz/unstable 2.0 all [upgradable from: 0.1]
25dpkg/now 1.16.2+fake all [installed,local]
26foo/unstable 1.0 all
27foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
28
29testsuccessequal "Listing...
30foo/unstable 1.0 all
31foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*"
32
33testsuccessequal "Listing...
34baz/unstable 2.0 all [upgradable from: 0.1]
35foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable
36
37# FIXME: hm, hm - does it make sense to have this different? shouldn't
38# we use "installed,upgradable" consitently?
39testsuccessequal "Listing...
40bar/now 1.0 i386 [installed,local]
41baz/now 0.1 all [installed,upgradable to: 2.0]
42dpkg/now 1.16.2+fake all [installed,local]
43foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed
44
45testsuccessequal "Listing...
46bar/now 1.0 i386 [installed,local]
47
48foobar/unstable 2.0 i386 [upgradable from: 1.0]
49foobar/now 1.0 i386 [installed,upgradable to: 2.0]
50" apt list bar foobar --all-versions
51
52testsuccessequal "Listing...
53bar/now 1.0 i386 [installed,local]
54 an autogenerated dummy bar=1.0/installed
55" apt list bar --verbose
56
57# test for dpkg ^rc state
58insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files'
59testsuccessequal "Listing...
60conf-only/now 1.0 i386 [residual-config]" apt list conf-only
61
62# ensure that the users learns about multiple versions too
63testsuccessequal "Listing...
64baz/unstable 2.0 all [upgradable from: 0.1]
65N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0
66testsuccessequal 'Listing...
67baz/unstable 2.0 all [upgradable from: 0.1]
68baz/testing 1.0 all
69baz/now 0.1 all [installed,upgradable to: 2.0]
70' apt list baz -o quiet=0 -a
71
72# test format strings for machine parseable output
73testsuccessequal 'bar - 1.0 - 1.0
74baz - 0.1 - 2.0' apt list -qq bar baz -o APT::Cmd::use-format=true -o APT::Cmd::format="\${Package} - \${installed:Version} - \${candidate:Version}"