summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
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...