diff options
Diffstat (limited to 'test/pacman')
-rw-r--r-- | test/pacman/tests/TESTS | 1 | ||||
-rw-r--r-- | test/pacman/tests/noupgrade-inverted.py | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS index 052cf4b2..12adf6da 100644 --- a/test/pacman/tests/TESTS +++ b/test/pacman/tests/TESTS @@ -63,6 +63,7 @@ TESTS += test/pacman/tests/ldconfig003.py TESTS += test/pacman/tests/mode001.py TESTS += test/pacman/tests/mode002.py TESTS += test/pacman/tests/mode003.py +TESTS += test/pacman/tests/noupgrade-inverted.py TESTS += test/pacman/tests/pacman001.py TESTS += test/pacman/tests/pacman002.py TESTS += test/pacman/tests/pacman003.py diff --git a/test/pacman/tests/noupgrade-inverted.py b/test/pacman/tests/noupgrade-inverted.py new file mode 100644 index 00000000..8e7f1eaa --- /dev/null +++ b/test/pacman/tests/noupgrade-inverted.py @@ -0,0 +1,19 @@ +self.description = "Upgrade a package with files that match negated NoUpgrade patterns" + +lp = pmpkg("foobar") +lp.files = ["foo/bar", "foo/baz"] +self.addpkg2db("local", lp) + +p = pmpkg("foobar", "1.0-2") +p.files = ["foo/bar"] +self.addpkg(p) + +self.option["NoUpgrade"] = ["foo/*", "!foo/bar", "!foo/baz"] + +self.args = "-U %s" % p.filename() + +self.addrule("PKG_VERSION=foobar|1.0-2") +self.addrule("!FILE_EXIST=foo/baz") +self.addrule("FILE_MODIFIED=foo/bar") +self.addrule("!FILE_PACNEW=foo/bar") +self.addrule("!FILE_PACSAVE=foo/bar") |