]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-cache-showsrc
Make directory paths configurable
[apt.git] / test / integration / test-apt-cache-showsrc
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6
7 setupenvironment
8 configarchitecture "i386"
9
10 # we have a foo source package
11 insertsource 'unstable' 'foo' 'all' '1.0' '' 'foo-binary'
12
13 # and a similar one that builds a foo binary package
14 insertsource 'unstable' 'unreleated' 'all' '1.0' '' 'foo'
15
16 # just here to workaround the need for a authenticated package
17 insertpackage 'unstable' 'workaround' 'all' '1.0'
18
19 setupaptarchive
20
21 # by default apt-cache showsrc will look into "binary" and "source" names
22 # and show all matches
23 aptcache showsrc foo > output.txt
24 testsuccess grep "Package: foo" output.txt
25 testsuccess grep "Package: unreleated" output.txt
26
27 # by default apt-cache showsrc will look into "binary" and "source" names
28 # and show all matches
29 aptcache showsrc --only-source foo > output.txt
30 testsuccess grep "Package: foo" output.txt
31 testfailure grep "Package: unreleated" output.txt