diff options
author | Michael Vogt <mvo@debian.org> | 2015-08-18 20:39:59 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2015-08-18 20:39:59 +0200 |
commit | a8275acf87cf15992e6b89694d6276e0a5e529b9 (patch) | |
tree | 44e4264e28d8a932a1298f71b316fd01359fb39c /test/integration/test-apt-cache-showsrc | |
parent | 5b1997c095acf183077ec49b2a8cbb1174e3c280 (diff) |
Add support for "apt-cache showsrc --only-source srcpkgname"
Thanks: Steve Slangasek for the suggestion
Closes: 695633
Diffstat (limited to 'test/integration/test-apt-cache-showsrc')
-rwxr-xr-x | test/integration/test-apt-cache-showsrc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/integration/test-apt-cache-showsrc b/test/integration/test-apt-cache-showsrc new file mode 100755 index 000000000..319b4f2f2 --- /dev/null +++ b/test/integration/test-apt-cache-showsrc @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +# we have a foo source package +insertsource 'unstable' 'foo' 'all' '1.0' '' 'foo-binary' + +# and a similar one that builds a foo binary package +insertsource 'unstable' 'unreleated' 'all' '1.0' '' 'foo' + +# just here to workaround the need for a authenticated package +insertpackage 'unstable' 'workaround' 'all' '1.0' + +setupaptarchive + +# by default apt-cache showsrc will look into "binary" and "source" names +# and show all matches +aptcache showsrc foo > output.txt +testsuccess grep "Package: foo" output.txt +testsuccess grep "Package: unreleated" output.txt + +# by default apt-cache showsrc will look into "binary" and "source" names +# and show all matches +aptcache showsrc --only-source foo > output.txt +testsuccess grep "Package: foo" output.txt +testfailure grep "Package: unreleated" output.txt |