]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-cli-list
centralize unlink checks in acquire-item
[apt.git] / test / integration / test-apt-cli-list
CommitLineData
14109555
MV
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
d6570f85
MV
16insertinstalledpackage 'baz' 'all' '0.1'
17insertpackage 'testing' 'baz' 'all' '1.0'
18insertpackage 'unstable' 'baz' 'all' '2.0'
19
14109555
MV
20setupaptarchive
21
25b86db1 22testsuccessequal "Listing...
4afa7d18 23bar/now 1.0 i386 [installed,local]
d6570f85 24baz/unstable 2.0 all [upgradable from: 0.1]
14109555 25foo/unstable 1.0 all
4afa7d18 26foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
14109555 27
25b86db1 28testsuccessequal "Listing...
14109555 29foo/unstable 1.0 all
4afa7d18 30foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*"
14109555 31
25b86db1 32testsuccessequal "Listing...
d6570f85 33baz/unstable 2.0 all [upgradable from: 0.1]
4afa7d18 34foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable
14109555
MV
35
36# FIXME: hm, hm - does it make sense to have this different? shouldn't
37# we use "installed,upgradable" consitently?
25b86db1 38testsuccessequal "Listing...
4afa7d18 39bar/now 1.0 i386 [installed,local]
d6570f85 40baz/now 0.1 all [installed,upgradable to: 2.0]
4afa7d18 41foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed
14109555 42
25b86db1 43testsuccessequal "Listing...
16576001
MV
44bar/now 1.0 i386 [installed,local]
45
4afa7d18
MV
46foobar/unstable 2.0 i386 [upgradable from: 1.0]
47foobar/now 1.0 i386 [installed,upgradable to: 2.0]
16576001 48" apt list bar foobar --all-versions
14109555 49
25b86db1 50testsuccessequal "Listing...
4afa7d18 51bar/now 1.0 i386 [installed,local]
14109555
MV
52 an autogenerated dummy bar=1.0/installed
53" apt list bar --verbose
54
c8259fcd
MV
55# test for dpkg ^rc state
56insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files'
25b86db1 57testsuccessequal "Listing...
c8259fcd
MV
58conf-only/now 1.0 i386 [residual-config]" apt list conf-only
59
d6570f85 60# ensure that the users learns about multiple versions too
25b86db1 61testsuccessequal "Listing...
d6570f85
MV
62baz/unstable 2.0 all [upgradable from: 0.1]
63N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0
631800b1
DK
64testsuccessequal 'Listing...
65baz/unstable 2.0 all [upgradable from: 0.1]
66baz/testing 1.0 all
67baz/now 0.1 all [installed,upgradable to: 2.0]
68' apt list baz -o quiet=0 -a
d6570f85 69
6763aaec 70# test format strings for machine parseable output
25b86db1
DK
71testsuccessequal 'bar - 1.0 - 1.0
72baz - 0.1 - 2.0' apt list -qq bar baz -o APT::Cmd::use-format=true -o APT::Cmd::format="\${Package} - \${installed:Version} - \${candidate:Version}"