summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2016-01-14 09:28:47 +0100
committerMichael Vogt <mvo@ubuntu.com>2016-01-14 09:28:47 +0100
commitb0ce7c65309585d4b9752bb571a0e616036eb162 (patch)
treeb41ea70d933f35eac3f19774e78a7de8982cd8fc /test/integration
parent7d2794a20bdab9b848bf5b4e88d73527405bad54 (diff)
Do not show multiple identical apt-cache showsrc entries
Closes: #734922
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-bug-734922-apt-showsrc-duplicate25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/integration/test-bug-734922-apt-showsrc-duplicate b/test/integration/test-bug-734922-apt-showsrc-duplicate
new file mode 100755
index 000000000..d4370e2ba
--- /dev/null
+++ b/test/integration/test-bug-734922-apt-showsrc-duplicate
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+# foo is identical, show it only once in showsrc
+insertpackage "unstable" "foo" "i386" "1.0"
+insertpackage "testing" "foo" "i386" "1.0"
+insertsource "unstable" "foo" "i386" "1.0"
+insertsource "testing" "foo" "i386" "1.0"
+
+# bar is different, show twice
+insertsource "unstable" "bar" "i386" "1.0"
+insertsource "testing" "bar" "i386" "2.0"
+
+setupaptarchive
+
+# ensure "foo" is not shown twice
+aptcache showsrc foo bar|grep ^Package: > out.txt
+testequal "Package: foo
+Package: bar
+Package: bar" cat out.txt