]>
Commit | Line | Data |
---|---|---|
6d73fe5b MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
90139c70 | 8 | configarchitecture 'i386' 'amd64' |
6d73fe5b | 9 | |
90139c70 | 10 | DESCR='Some description |
6d73fe5b MV |
11 | That has multiple lines' |
12 | insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR" | |
90139c70 | 13 | insertpackage 'unstable' 'bar' 'i386,amd64' '1' '' '' "$DESCR" |
85d7c0eb | 14 | insertinstalledpackage 'foo' 'all' '1.0' |
6d73fe5b MV |
15 | |
16 | setupaptarchive | |
17 | ||
18 | APTARCHIVE=$(readlink -f ./aptarchive) | |
19 | ||
20 | # note that we do not display Description-md5 with the "apt" cmd | |
85d7c0eb | 21 | # and also show some additional fields that are calculated |
25b86db1 | 22 | testsuccessequal "Package: foo |
88593886 | 23 | Version: 1.0 |
6d73fe5b MV |
24 | Priority: optional |
25 | Section: other | |
6d73fe5b | 26 | Maintainer: Joe Sixpack <joe@example.org> |
88593886 | 27 | Installed-Size: 43.0 kB |
9e51c0b6 | 28 | Download-Size: unknown |
17622532 | 29 | APT-Manual-Installed: yes |
1dd20368 | 30 | APT-Sources: file:$APTARCHIVE unstable/main all Packages |
90139c70 | 31 | Description: Some description |
6d73fe5b MV |
32 | That has multiple lines |
33 | " apt show foo | |
90139c70 DK |
34 | testsuccessequal "Package: bar |
35 | Version: 1 | |
36 | Priority: optional | |
37 | Section: other | |
38 | Maintainer: Joe Sixpack <joe@example.org> | |
39 | Installed-Size: 43.0 kB | |
40 | Download-Size: unknown | |
41 | APT-Sources: file:$APTARCHIVE unstable/main i386 Packages | |
42 | Description: Some description | |
43 | That has multiple lines | |
44 | " apt show bar | |
45 | testsuccessequal "Package: bar:amd64 | |
46 | Version: 1 | |
47 | Priority: optional | |
48 | Section: other | |
49 | Maintainer: Joe Sixpack <joe@example.org> | |
50 | Installed-Size: 43.0 kB | |
51 | Download-Size: unknown | |
52 | APT-Sources: file:$APTARCHIVE unstable/main amd64 Packages | |
53 | Description: Some description | |
54 | That has multiple lines | |
55 | " apt show bar:amd64 | |
081c9d44 DK |
56 | |
57 | # this is the default, but disabled by the testcases | |
58 | testsuccess apt show foo -o Apt::Cmd::Disable-Script-Warning=0 | |
59 | cp rootdir/tmp/testsuccess.output aptshow.output | |
60 | testsuccess grep '^WARNING: ' aptshow.output | |
61 | ||
62 | if [ "$(id -u)" != '0' ]; then | |
63 | testsuccess apt install foo -s -o APT::Get::Show-User-Simulation-Note=1 | |
64 | cp rootdir/tmp/testsuccess.output aptshow.output | |
65 | testsuccess grep '^NOTE: ' aptshow.output | |
66 | fi |