diff options
author | Michael Vogt <mvo@debian.org> | 2014-01-22 08:25:02 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-01-22 08:34:30 +0100 |
commit | 1bef0dd58a281ca2f2900a48459d2c87b4ba8bba (patch) | |
tree | 00885f69034ac8b98623749fc36e8938be17b074 /test/integration/test-apt-cli-list | |
parent | 8a59cc322ac57c6662949e957611ed718a5f5119 (diff) |
add integration test for apt search
Diffstat (limited to 'test/integration/test-apt-cli-list')
-rwxr-xr-x | test/integration/test-apt-cli-list | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list new file mode 100755 index 000000000..8d5df9051 --- /dev/null +++ b/test/integration/test-apt-cli-list @@ -0,0 +1,47 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +insertpackage 'unstable' 'foo' 'all' '1.0' +insertinstalledpackage 'bar' 'i386' '1.0' + +insertinstalledpackage 'foobar' 'i386' '1.0' +insertpackage 'unstable' 'foobar' 'i386' '2.0' + +setupaptarchive + +APTARCHIVE=$(readlink -f ./aptarchive) + +testequal "Listing... +bar/now 1.0 [installed,local] i386 +foo/unstable 1.0 all +foobar/unstable 2.0 [upgradable from: 1.0] i386" apt list + +testequal "Listing... +foo/unstable 1.0 all +foobar/unstable 2.0 [upgradable from: 1.0] i386" apt list "foo*" + +testequal "Listing... +foobar/unstable 2.0 [upgradable from: 1.0] i386" apt list --upgradable + +# FIXME: hm, hm - does it make sense to have this different? shouldn't +# we use "installed,upgradable" consitently? +testequal "Listing... +bar/now 1.0 [installed,local] i386 +foobar/now 1.0 [installed,upgradable to: 2.0] i386" apt list --installed + +testequal "Listing... +foobar/unstable 2.0 [upgradable from: 1.0] i386 +foobar/now 1.0 [installed,upgradable to: 2.0] i386 +" apt list foobar --all-versions + +testequal "Listing... +bar/now 1.0 [installed,local] i386 + an autogenerated dummy bar=1.0/installed +" apt list bar --verbose + |