4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'amd64' 'i386'
9 insertpackage
'unstable' 'bar' 'amd64,i386' '1'
10 insertpackage
'unstable' 'uninstalled' 'all' '1'
11 insertpackage
'unstable' 'uninstalled-native' 'amd64' '1'
13 insertinstalledpackage
'foo' 'all' '1'
14 insertinstalledpackage
'bar' 'amd64' '1'
18 # dpkg is "installed" by our test framework
19 testdpkginstalled dpkg
22 testempty aptmark showauto
23 testempty aptcache showauto
26 foo' aptmark showmanual
28 foo' aptmark showmanual bar foo uninstalled
31 testsuccessequal
'foo' aptmark showauto
32 testsuccessequal
'foo' aptcache showauto
33 testsuccessequal
'foo' aptmark showauto foo
34 testsuccessequal
'foo' aptcache showauto foo
36 dpkg' aptmark showmanual
37 testsuccessequal
'bar' aptmark showmanual bar
39 testmarkonpkgasauto
() {
51 testfailureequal
'E: No packages found' aptmark auto
52 testfailureequal
'E: No packages found' aptmark manual
55 testmarkonpkgasauto
'aptmark' 'auto' 'manual'
56 testmarkonpkgasauto
'aptmark' 'markauto' 'unmarkauto'
57 testmarkonpkgasauto
'aptget' 'markauto' 'unmarkauto'
60 testempty aptmark showhold
61 testempty aptmark showholds
# typical "typo"
62 testempty aptmark showhold dpkg
63 testempty aptmark showholds dpkg
66 testsuccessequal
"$1" aptmark showhold
67 testsuccessequal
"$1" aptmark showholds
68 testsuccessequal
"$1" aptmark showhold
$1
69 testsuccessequal
"$1" aptmark showholds
$1
71 testmarkonepkgashold
() {
72 testsuccess aptmark hold
$1
74 testsuccess aptmark hold
$1
76 testsuccess aptmark unhold
$1
78 testsuccess aptmark unhold
$1
82 testfailureequal
'E: No packages found' aptmark hold
83 testfailureequal
'E: No packages found' aptmark unhold
86 testmarkonepkgashold
'foo'
87 testmarkonepkgashold
'bar'
89 msgtest
'dpkg supports --merge-avail via' 'stdin'
90 if dpkg
--merge-avail - < /dev
/null
>/dev
/null
2>&1; then
93 msgskip
'dpkg version too old'
97 testmarkonepkgashold
'uninstalled'
98 testmarkonepkgashold
'uninstalled-native'
100 testsuccessequal
'uninstalled set on hold.' aptmark hold uninstalled
101 testsuccessequal
'uninstalled-native set on hold.' aptmark hold uninstalled
-native