]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-cli-show
show apt-key warnings in apt update
[apt.git] / test / integration / test-apt-cli-show
CommitLineData
6d73fe5b
MV
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6d73fe5b
MV
6
7setupenvironment
90139c70 8configarchitecture 'i386' 'amd64'
6d73fe5b 9
90139c70 10DESCR='Some description
6d73fe5b
MV
11 That has multiple lines'
12insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR"
90139c70 13insertpackage 'unstable' 'bar' 'i386,amd64' '1' '' '' "$DESCR"
85d7c0eb 14insertinstalledpackage 'foo' 'all' '1.0'
6d73fe5b
MV
15
16setupaptarchive
17
18APTARCHIVE=$(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 22testsuccessequal "Package: foo
88593886 23Version: 1.0
6d73fe5b
MV
24Priority: optional
25Section: other
6d73fe5b 26Maintainer: Joe Sixpack <joe@example.org>
88593886 27Installed-Size: 43.0 kB
9e51c0b6 28Download-Size: unknown
17622532 29APT-Manual-Installed: yes
1dd20368 30APT-Sources: file:$APTARCHIVE unstable/main all Packages
90139c70 31Description: Some description
6d73fe5b
MV
32 That has multiple lines
33" apt show foo
90139c70
DK
34testsuccessequal "Package: bar
35Version: 1
36Priority: optional
37Section: other
38Maintainer: Joe Sixpack <joe@example.org>
39Installed-Size: 43.0 kB
40Download-Size: unknown
41APT-Sources: file:$APTARCHIVE unstable/main i386 Packages
42Description: Some description
43 That has multiple lines
44" apt show bar
45testsuccessequal "Package: bar:amd64
46Version: 1
47Priority: optional
48Section: other
49Maintainer: Joe Sixpack <joe@example.org>
50Installed-Size: 43.0 kB
51Download-Size: unknown
52APT-Sources: file:$APTARCHIVE unstable/main amd64 Packages
53Description: 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
58testsuccess apt show foo -o Apt::Cmd::Disable-Script-Warning=0
59cp rootdir/tmp/testsuccess.output aptshow.output
60testsuccess grep '^WARNING: ' aptshow.output
61
62if [ "$(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
66fi