diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-11-29 18:02:56 -0500 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-12-18 22:22:35 +1000 |
commit | 3af0268fdbafbeb0a2e45d3555ef9d224d89c29d (patch) | |
tree | d96b4434c9cd7b838d5302ff487677582383201c /test | |
parent | df36fe2e79d5a5490b89c259bef7a1f150cff575 (diff) |
remove.c: honor inverted patterns in noupgrade
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-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") |