]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-policy-pinning
add optional support for comments in pkgTagFile
[apt.git] / test / integration / test-policy-pinning
index dba8736564f0cb46a6437d64610b1dc2fbe5c0dd..635dcb8742c45c5838d4c0ed3a969622507703ef 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 set -e
 
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
 
 setupenvironment
 configarchitecture "i386"
@@ -83,6 +83,15 @@ buildsimplenativepackage "coolstuff" "all" "2.0~bpo1" "backports"
 
 setupaptarchive
 
+testsuccessequal "coolstuff:
+  Installed: (none)
+  Candidate: 2.0~bpo1
+  Version table:
+     2.0~bpo1 500
+        500 file:${APTARCHIVE} backports/main all Packages
+     1.0 500
+        500 file:${APTARCHIVE} stable/main all Packages" apt policy '^cool.*'
+
 testequalpolicycoolstuff() {
        local INSTALLED="${1:-(none)}"
        local CANDIDATE="${2:-(none)}"
@@ -293,7 +302,7 @@ Pin-Priority: 2147483648
 " > rootdir/etc/apt/preferences
 
 testfailureequal "Reading package lists...
-E: Cannot convert 2147483648 to integer -  (34: Numerical result out of range)
+E: Cannot convert 2147483648 to integer: out of range
 E: ${tmppath}/rootdir/etc/apt/preferences: Value 2147483648 is outside the range of valid pin priorities (-32768 to 32767)" \
  aptget install -s coolstuff -o PinPriority=2147483648