summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-06-29 23:26:38 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-06-29 23:26:38 +0200
commite2bba11c9a1858c98954e7c5299d20a6c0966cc7 (patch)
tree989524c6e7833911ac3bb8de7fdac48450eb1075 /test/integration
parent1925ea3d0cd6579a4034acb7308e532d025319c7 (diff)
- ensure that only the first specific stanza for a package is used
- save all stanzas which had no effect in Unmatched
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-pin-non-existent-package15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/integration/test-pin-non-existent-package b/test/integration/test-pin-non-existent-package
index 1031272e2..bd6ccc476 100755
--- a/test/integration/test-pin-non-existent-package
+++ b/test/integration/test-pin-non-existent-package
@@ -12,7 +12,13 @@ setupaptarchive
testcandidate() {
msgtest "Test that the Candidate for $1 is" $2
- test "$(aptcache policy $1 | grep '^ Candidate:')" = " Candidate: $2" && msgpass || msgfail
+ if [ "$(aptcache policy $1 | grep '^ Candidate:')" = " Candidate: $2" ]; then
+ msgpass
+ else
+ echo
+ aptcache policy $1
+ msgfail
+ fi
}
testcandidate apt '0.8.15'
@@ -37,6 +43,13 @@ Pin: release a=unstable
Pin-Priority: 1000' >> rootdir/etc/apt/preferences
testcandidate apt '(none)'
+
+echo '
+Package: apt
+Pin: release a=unstable
+Pin-Priority: 1000' >> rootdir/etc/apt/preferences
+
+testcandidate apt '(none)'
testequal 'N: Unable to locate package doesntexist' aptcache policy doesntexist -q=0
testequal 'Reading package lists...