summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-25 19:58:43 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-04 18:04:00 +0100
commit64e3414e00906e6eaa72d7b63ca76d1c59ecadf6 (patch)
tree5425586b556798bc1dbbb35c53e697a5a916394e /test
parentb49068c566d749130e023536d54588c948c16edf (diff)
allow all dpkg selections to be set via apt-mark and libapt
As we have support for 'hold', we need support for undoing a hold which in effect means that we implemented most other states as well, just that they weren't exposed in the interface directly so far.
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-mark40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/integration/test-apt-mark b/test/integration/test-apt-mark
index ec4ed8316..47ade45b1 100755
--- a/test/integration/test-apt-mark
+++ b/test/integration/test-apt-mark
@@ -112,3 +112,43 @@ Inst uninstalled (1 unstable [all])
Inst uninstalled-native (1 unstable [amd64])
Conf uninstalled (1 unstable [all])
Conf uninstalled-native (1 unstable [amd64])' aptget install uninstalled uninstalled-native -s
+testsuccess aptmark unhold uninstalled uninstalled-native
+
+testselections() {
+ testsuccess aptmark hold "$1"
+ testsuccessequal "$1" aptmark showholds "$1"
+ testsuccess aptmark unhold "$1"
+ testsuccessequal "$1" aptmark showinstalls "$1"
+ testsuccess aptmark hold "$1"
+ testsuccessequal "$1" aptmark showholds "$1"
+ testsuccess aptmark install "$1"
+ testsuccessequal "$1" aptmark showinstalls "$1"
+ testsuccess aptmark remove "$1"
+ testsuccessequal "$1" aptmark showremoves "$1"
+ testsuccess aptmark purge "$1"
+ testsuccessequal "$1" aptmark showpurges "$1"
+}
+testselections 'foo'
+testselections 'bar'
+
+testsuccessequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ bar* foo*
+0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
+Purg bar [1]
+Purg foo [1]' aptget dselect-upgrade -s
+
+testuninstalledselections() {
+ testsuccess aptmark hold "$1"
+ testsuccessequal "$1" aptmark showholds "$1"
+ testsuccess aptmark unhold "$1"
+ testsuccessequal "$1" aptmark showremoves "$1"
+ testsuccess aptmark hold "$1"
+ testsuccessequal "$1" aptmark showholds "$1"
+ testsuccess aptmark install "$1"
+ testsuccessequal "$1" aptmark showinstalls "$1"
+}
+testuninstalledselections 'uninstalled'
+testuninstalledselections 'uninstalled-native'