summaryrefslogtreecommitdiff
path: root/test/integration/test-ubuntu-bug-761175-remove-purge
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2011-05-16 15:57:52 +0200
committerMichael Vogt <mvo@debian.org>2011-05-16 15:57:52 +0200
commitd44b706c2d5964daaaf55e6eb97845827958f6e3 (patch)
treeb77f6e72c34c2444ec28e2d47430211d802efb4b /test/integration/test-ubuntu-bug-761175-remove-purge
parent9c192d2811c12dcaf607024eb7f0677b011194e6 (diff)
parentd77b985a309c379d4978525172a72b728fecd15e (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'test/integration/test-ubuntu-bug-761175-remove-purge')
-rwxr-xr-xtest/integration/test-ubuntu-bug-761175-remove-purge38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge
new file mode 100755
index 000000000..93b67fc02
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-761175-remove-purge
@@ -0,0 +1,38 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+setupsimplenativepackage 'compiz-core' 'i386' '1.0' 'unstable'
+BUILDDIR='incoming/compiz-core-1.0'
+mkdir -p ${BUILDDIR}/debian/compiz-core/etc
+echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
+echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
+buildpackage "$BUILDDIR" 'unstable' 'main'
+rm -rf "$BUILDDIR"
+
+setupaptarchive
+
+
+testdpkgnotinstalled compiz-core
+msgtest 'Install package' 'compiz-core'
+aptget install compiz-core -qq 2>&1 >/dev/null && msgpass || msgfail
+testdpkginstalled compiz-core
+
+msgtest 'Remove package' 'compiz-core'
+aptget remove compiz-core -y -qq 2>&1 >/dev/null && msgpass || msgfail
+testdpkgnotinstalled compiz-core
+
+msgtest 'Check that conffiles are still around for' 'compiz-core'
+dpkg -l compiz-core | grep '^rc' 2>&1 >/dev/null && msgpass || msgfail
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ compiz-core*
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+Purg compiz-core' aptget purge compiz-core -s