From 851b6a097165af4d51c0db01b5e05256e5006896 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:00:48 +0200 Subject: Adding upstream version 2.6.1. Signed-off-by: Daniel Baumann --- test/integration/test-apt-cache-showsrc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/integration/test-apt-cache-showsrc (limited to 'test/integration/test-apt-cache-showsrc') diff --git a/test/integration/test-apt-cache-showsrc b/test/integration/test-apt-cache-showsrc new file mode 100755 index 0000000..d3f61d9 --- /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' 'unrelated' '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: unrelated" 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: unrelated" output.txt -- cgit v1.2.3