summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-691453-apt-cache-search-multi-pattern
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-02 08:32:34 +0200
committerMichael Vogt <mvo@debian.org>2013-07-02 08:32:34 +0200
commit8e4c3f0a42664b8c37cc2e0de285849fbf118e11 (patch)
tree059b76fef1c1636a7e1ad16e5a4ce06304271718 /test/integration/test-bug-691453-apt-cache-search-multi-pattern
parent25a4d2049fb79bc2c86cd45e977b4a071e5300ac (diff)
parente3c62328abbd548bb0da42fdbad954b3ce4f7102 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Conflicts: debian/changelog
Diffstat (limited to 'test/integration/test-bug-691453-apt-cache-search-multi-pattern')
-rwxr-xr-xtest/integration/test-bug-691453-apt-cache-search-multi-pattern33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/integration/test-bug-691453-apt-cache-search-multi-pattern b/test/integration/test-bug-691453-apt-cache-search-multi-pattern
new file mode 100755
index 000000000..0367892fc
--- /dev/null
+++ b/test/integration/test-bug-691453-apt-cache-search-multi-pattern
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'native'
+
+insertpackage 'unstable' 'foobar' 'native' '1' '' '' 'funky tool'
+insertpackage 'unstable' 'coolstuff' 'native' '1' '' '' 'funky tool just like foo and bar'
+insertpackage 'unstable' 'foo' 'native' '1' '' '' 'tool best used with bar'
+insertpackage 'unstable' 'bar' 'native' '1' '' '' 'tool best used with foo'
+insertpackage 'unstable' 'baz' 'native' '1' 'Provides: bar' '' 'alternative tool best used with foo'
+
+setupaptarchive
+
+# in this special case the following queries should be equal
+FOOBAR='foobar - funky tool
+coolstuff - funky tool just like foo and bar
+foo - tool best used with bar
+bar - tool best used with foo
+baz - alternative tool best used with foo'
+
+testequal "$FOOBAR" aptcache search foo
+testequal "$FOOBAR" aptcache search bar
+testequal "$FOOBAR" aptcache search foo bar
+
+testequal 'foobar - funky tool
+foo - tool best used with bar' aptcache search -n foo
+testequal 'foobar - funky tool
+bar - tool best used with foo
+baz - alternative tool best used with foo' aptcache search -n bar
+testequal 'foobar - funky tool' aptcache search -n foo bar