testnoautopkg() {
testempty aptmark showauto
+ testempty aptcache showauto
testequal 'bar
dpkg
foo' aptmark showmanual
testequal 'bar
foo' aptmark showmanual bar foo uninstalled
}
-testmarkonpkgasauto() {
- testsuccess aptmark $1 foo
+testfooisauto() {
testequal 'foo' aptmark showauto
+ testequal 'foo' aptcache showauto
testequal 'foo' aptmark showauto foo
+ testequal 'foo' aptcache showauto foo
testequal 'bar
dpkg' aptmark showmanual
testequal 'bar' aptmark showmanual bar
+}
+testmarkonpkgasauto() {
+ testsuccess $1 $2 foo
+ testfooisauto
+ testsuccess $1 $2 foo
+ testfooisauto
- testsuccess aptmark $2 foo
+ testsuccess $1 $3 foo
+ testnoautopkg
+ testsuccess $1 $3 foo
testnoautopkg
}
testequal 'E: No packages found' aptmark manual
testnoautopkg
-testmarkonpkgasauto 'auto' 'manual'
-testmarkonpkgasauto 'markauto' 'unmarkauto'
+testmarkonpkgasauto 'aptmark' 'auto' 'manual'
+testmarkonpkgasauto 'aptmark' 'markauto' 'unmarkauto'
+testmarkonpkgasauto 'aptget' 'markauto' 'unmarkauto'
testnoholdpkg() {
testempty aptmark showhold
testempty aptmark showhold dpkg
testempty aptmark showholds dpkg
}
-testmarkonepkgashold() {
- testsuccess aptmark hold $1
+testpkgonhold() {
testequal "$1" aptmark showhold
testequal "$1" aptmark showholds
+ testequal "$1" aptmark showhold $1
+ testequal "$1" aptmark showholds $1
+}
+testmarkonepkgashold() {
+ testsuccess aptmark hold $1
+ testpkgonhold $1
+ testsuccess aptmark hold $1
+ testpkgonhold $1
+ testsuccess aptmark unhold $1
+ testnoholdpkg
testsuccess aptmark unhold $1
testnoholdpkg
}