]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-apt-cli-list
Make Proxy-Auto-Detect check for each host
[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
10if [ ! -x ${BUILDDIRECTORY}/apt ]; then
11 msgmsg "No ${BUILDDIRECTORY}/apt"
12 msgskip
13 exit 0
14fi
15
16insertpackage 'unstable' 'foo' 'all' '1.0'
17insertinstalledpackage 'bar' 'i386' '1.0'
18
19insertinstalledpackage 'foobar' 'i386' '1.0'
20insertpackage 'unstable' 'foobar' 'i386' '2.0'
21
22insertinstalledpackage 'baz' 'all' '0.1'
23insertpackage 'testing' 'baz' 'all' '1.0'
24insertpackage 'unstable' 'baz' 'all' '2.0'
25
26setupaptarchive
27
28APTARCHIVE=$(readlink -f ./aptarchive)
29
30testequal "Listing...
31bar/now 1.0 i386 [installed,local]
32baz/unstable 2.0 all [upgradable from: 0.1]
33foo/unstable 1.0 all
34foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list
35
36testequal "Listing...
37foo/unstable 1.0 all
38foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*"
39
40testequal "Listing...
41baz/unstable 2.0 all [upgradable from: 0.1]
42foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable
43
44# FIXME: hm, hm - does it make sense to have this different? shouldn't
45# we use "installed,upgradable" consitently?
46testequal "Listing...
47bar/now 1.0 i386 [installed,local]
48baz/now 0.1 all [installed,upgradable to: 2.0]
49foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed
50
51testequal "Listing...
52foobar/unstable 2.0 i386 [upgradable from: 1.0]
53foobar/now 1.0 i386 [installed,upgradable to: 2.0]
54" apt list foobar --all-versions
55
56testequal "Listing...
57bar/now 1.0 i386 [installed,local]
58 an autogenerated dummy bar=1.0/installed
59" apt list bar --verbose
60
61# test for dpkg ^rc state
62insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files'
63testequal "Listing...
64conf-only/now 1.0 i386 [residual-config]" apt list conf-only
65
66# ensure that the users learns about multiple versions too
67testequal "Listing...
68baz/unstable 2.0 all [upgradable from: 0.1]
69N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0
70
71