]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-cli-show
M-A: allowed pkgs of unconfigured archs do not statisfy :any
[apt.git] / test / integration / test-apt-cli-show
CommitLineData
6d73fe5b
MV
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
3c74988b
MV
10if [ ! -x ${BUILDDIRECTORY}/apt ]; then
11 msgmsg "No ${BUILDDIRECTORY}/apt"
12 msgskip
13 exit 0
14fi
15
6d73fe5b
MV
16DESCR='Some description
17 That has multiple lines'
18insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR"
85d7c0eb 19insertinstalledpackage 'foo' 'all' '1.0'
6d73fe5b
MV
20
21setupaptarchive
22
23APTARCHIVE=$(readlink -f ./aptarchive)
24
25# note that we do not display Description-md5 with the "apt" cmd
85d7c0eb 26# and also show some additional fields that are calculated
25b86db1 27testsuccessequal "Package: foo
88593886 28Version: 1.0
6d73fe5b
MV
29Priority: optional
30Section: other
6d73fe5b 31Maintainer: Joe Sixpack <joe@example.org>
88593886 32Installed-Size: 43.0 kB
9e51c0b6 33Download-Size: unknown
17622532 34APT-Manual-Installed: yes
1da3b7b8 35APT-Sources: file:$APTARCHIVE unstable/main i386 Packages
6d73fe5b
MV
36Description: Some description
37 That has multiple lines
38" apt show foo
081c9d44
DK
39
40# this is the default, but disabled by the testcases
41testsuccess apt show foo -o Apt::Cmd::Disable-Script-Warning=0
42cp rootdir/tmp/testsuccess.output aptshow.output
43testsuccess grep '^WARNING: ' aptshow.output
44
45if [ "$(id -u)" != '0' ]; then
46 testsuccess apt install foo -s -o APT::Get::Show-User-Simulation-Note=1
47 cp rootdir/tmp/testsuccess.output aptshow.output
48 testsuccess grep '^NOTE: ' aptshow.output
49fi