]>
Commit | Line | Data |
---|---|---|
14109555 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
3c74988b MV |
10 | if [ ! -x ${BUILDDIRECTORY}/apt ]; then |
11 | msgmsg "No ${BUILDDIRECTORY}/apt" | |
12 | msgskip | |
13 | exit 0 | |
14 | fi | |
15 | ||
14109555 MV |
16 | insertpackage 'unstable' 'foo' 'all' '1.0' |
17 | insertinstalledpackage 'bar' 'i386' '1.0' | |
18 | ||
19 | insertinstalledpackage 'foobar' 'i386' '1.0' | |
20 | insertpackage 'unstable' 'foobar' 'i386' '2.0' | |
21 | ||
d6570f85 MV |
22 | insertinstalledpackage 'baz' 'all' '0.1' |
23 | insertpackage 'testing' 'baz' 'all' '1.0' | |
24 | insertpackage 'unstable' 'baz' 'all' '2.0' | |
25 | ||
14109555 MV |
26 | setupaptarchive |
27 | ||
28 | APTARCHIVE=$(readlink -f ./aptarchive) | |
29 | ||
30 | testequal "Listing... | |
4afa7d18 | 31 | bar/now 1.0 i386 [installed,local] |
d6570f85 | 32 | baz/unstable 2.0 all [upgradable from: 0.1] |
14109555 | 33 | foo/unstable 1.0 all |
4afa7d18 | 34 | foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list |
14109555 MV |
35 | |
36 | testequal "Listing... | |
37 | foo/unstable 1.0 all | |
4afa7d18 | 38 | foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list "foo*" |
14109555 MV |
39 | |
40 | testequal "Listing... | |
d6570f85 | 41 | baz/unstable 2.0 all [upgradable from: 0.1] |
4afa7d18 | 42 | foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable |
14109555 MV |
43 | |
44 | # FIXME: hm, hm - does it make sense to have this different? shouldn't | |
45 | # we use "installed,upgradable" consitently? | |
46 | testequal "Listing... | |
4afa7d18 | 47 | bar/now 1.0 i386 [installed,local] |
d6570f85 | 48 | baz/now 0.1 all [installed,upgradable to: 2.0] |
4afa7d18 | 49 | foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed |
14109555 MV |
50 | |
51 | testequal "Listing... | |
4afa7d18 MV |
52 | foobar/unstable 2.0 i386 [upgradable from: 1.0] |
53 | foobar/now 1.0 i386 [installed,upgradable to: 2.0] | |
14109555 MV |
54 | " apt list foobar --all-versions |
55 | ||
56 | testequal "Listing... | |
4afa7d18 | 57 | bar/now 1.0 i386 [installed,local] |
14109555 MV |
58 | an autogenerated dummy bar=1.0/installed |
59 | " apt list bar --verbose | |
60 | ||
c8259fcd MV |
61 | # test for dpkg ^rc state |
62 | insertinstalledpackage 'conf-only' 'i386' '1.0' '' '' 'deinstall ok config-files' | |
63 | testequal "Listing... | |
64 | conf-only/now 1.0 i386 [residual-config]" apt list conf-only | |
65 | ||
d6570f85 MV |
66 | # ensure that the users learns about multiple versions too |
67 | testequal "Listing... | |
68 | baz/unstable 2.0 all [upgradable from: 0.1] | |
69 | N: There are 2 additional versions. Please use the '-a' switch to see them." apt list baz -o quiet=0 | |
70 | ||
23fc5eca | 71 |