]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-732746-preferences
test: Use a file to determine TEST_DEFAULT_GROUP
[apt.git] / test / integration / test-bug-732746-preferences
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'i386'
8
9 insertinstalledpackage 'bar' 'i386' '1.0'
10
11 cat > rootdir/etc/apt/preferences << EOF
12 # random test comment header
13
14 # commented out by puppy^Wpuppet
15 #Package: foo
16 #Pin: origin "ftp.debian.org"
17 #Pin: 800
18
19 Package: bar
20 Pin: version 1.0
21 Pin-Priority: 700
22
23 #Package: bar
24 #Pin: version 1.0
25 #Pin: 800
26 EOF
27
28 testsuccessequal "Reading package lists...
29 Building dependency tree..." aptget check
30
31 msgtest "Ensure policy is applied"
32 aptcache policy bar|grep -q "*** 1.0 700" && msgpass || msgfail