Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-06-26 12:33:33 -0400
committerAllan McRae <allan@archlinux.org>2014-08-03 18:46:32 +1000
commit0e2db97a42df30d2731e4842b245191a68817d78 (patch)
tree6fdbc2040d6a5cb304f3a204fece47e80e06332c /test
parent79548e0d78843dbf2266658c99cae6dafb643130 (diff)
add test for file type check with -Qk
If a directory has been replaced by a symlink, -Qk currently stats the symlink target rather than the symlink itself and doesn't check that the actual file type matches the package file list. This will make it difficult to discover errors once 4.2 is released and replacing directories with symlinks is no longer supported. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/TESTS1
-rw-r--r--test/pacman/tests/querycheck_fast_file_type.py14
2 files changed, 15 insertions, 0 deletions
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index dc47294a..1b5a81f9 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -90,6 +90,7 @@ TESTS += test/pacman/tests/query011.py
TESTS += test/pacman/tests/query012.py
TESTS += test/pacman/tests/querycheck001.py
TESTS += test/pacman/tests/querycheck002.py
+TESTS += test/pacman/tests/querycheck_fast_file_type.py
TESTS += test/pacman/tests/reason001.py
TESTS += test/pacman/tests/remove001.py
TESTS += test/pacman/tests/remove002.py
diff --git a/test/pacman/tests/querycheck_fast_file_type.py b/test/pacman/tests/querycheck_fast_file_type.py
new file mode 100644
index 00000000..a19fceeb
--- /dev/null
+++ b/test/pacman/tests/querycheck_fast_file_type.py
@@ -0,0 +1,14 @@
+self.description = "check file type without mtree"
+
+self.filesystem = [ "bar/", "foo -> bar/" ]
+
+pkg = pmpkg("dummy")
+pkg.files = [ "foo/" ]
+self.addpkg2db("local",pkg)
+
+self.args = "-Qk"
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("PACMAN_OUTPUT=warning.*(File type mismatch)")
+
+self.expectfailure = True