summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-mark
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-11-09 21:38:53 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-11-18 02:41:20 +0100
commit081c9d442a6d39fb9bc419fe3ce697cc791cb844 (patch)
tree52505e06aa24b79cbec7215dd1c0ef5305050eff /test/integration/test-apt-mark
parent546dbfc82ad9ff0308b365bca3731a1118b1d251 (diff)
various small additional tests and testcases
Usually they don't provide a lot in terms of what they test, but they help in covering many lines from strictly anecdotal commands (stats, moo) and error messages, so that stuff which really needs to be tested, but isn't is better visible in coverage reports. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-apt-mark')
-rwxr-xr-xtest/integration/test-apt-mark34
1 files changed, 27 insertions, 7 deletions
diff --git a/test/integration/test-apt-mark b/test/integration/test-apt-mark
index 69e0f933d..0f62a12b4 100755
--- a/test/integration/test-apt-mark
+++ b/test/integration/test-apt-mark
@@ -20,21 +20,31 @@ testdpkginstalled dpkg
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
}
@@ -42,8 +52,9 @@ testequal 'E: No packages found' aptmark auto
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
@@ -51,10 +62,19 @@ testnoholdpkg() {
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
}