]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-691453-apt-cache-search-multi-pattern
adapt to the new CacheSetHelper API
[apt.git] / test / integration / test-bug-691453-apt-cache-search-multi-pattern
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6 setupenvironment
7 configarchitecture 'native'
8
9 insertpackage 'unstable' 'foobar' 'native' '1' '' '' 'funky tool'
10 insertpackage 'unstable' 'coolstuff' 'native' '1' '' '' 'funky tool just like foo and bar'
11 insertpackage 'unstable' 'foo' 'native' '1' '' '' 'tool best used with bar'
12 insertpackage 'unstable' 'bar' 'native' '1' '' '' 'tool best used with foo'
13 insertpackage 'unstable' 'baz' 'native' '1' 'Provides: bar' '' 'alternative tool best used with foo'
14
15 setupaptarchive
16
17 # in this special case the following queries should be equal
18 FOOBAR='foobar - funky tool
19 coolstuff - funky tool just like foo and bar
20 foo - tool best used with bar
21 bar - tool best used with foo
22 baz - alternative tool best used with foo'
23
24 testequal "$FOOBAR" aptcache search foo
25 testequal "$FOOBAR" aptcache search bar
26 testequal "$FOOBAR" aptcache search foo bar
27
28 testequal 'foobar - funky tool
29 foo - tool best used with bar' aptcache search -n foo
30 testequal 'foobar - funky tool
31 bar - tool best used with foo
32 baz - alternative tool best used with foo' aptcache search -n bar
33 testequal 'foobar - funky tool' aptcache search -n foo bar