summaryrefslogtreecommitdiff
path: root/test/pacman/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/pacman/tests')
-rw-r--r--test/pacman/tests/TESTS1
-rw-r--r--test/pacman/tests/backup001.py20
2 files changed, 21 insertions, 0 deletions
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index f35ec1a0..acdf769b 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -1,3 +1,4 @@
+TESTS += test/pacman/tests/backup001.py
TESTS += test/pacman/tests/clean001.py
TESTS += test/pacman/tests/clean002.py
TESTS += test/pacman/tests/clean003.py
diff --git a/test/pacman/tests/backup001.py b/test/pacman/tests/backup001.py
new file mode 100644
index 00000000..e87b5f55
--- /dev/null
+++ b/test/pacman/tests/backup001.py
@@ -0,0 +1,20 @@
+self.description = "Upgrade a package, with a file in 'backup' (local modified, new unchanged)"
+
+self.filesystem = ["etc/dummy.conf.pacnew"]
+
+lp = pmpkg("dummy")
+lp.files = ["etc/dummy.conf*"]
+lp.backup = ["etc/dummy.conf"]
+self.addpkg2db("local", lp)
+
+p = pmpkg("dummy", "1.0-2")
+p.files = ["etc/dummy.conf"]
+p.backup = ["etc/dummy.conf"]
+self.addpkg(p)
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=dummy|1.0-2")
+self.addrule("FILE_PACNEW=etc/dummy.conf")
+self.addrule("!FILE_MODIFIED=etc/dummy.conf")