diff options
Diffstat (limited to 'test/pacman/pmrule.py')
-rw-r--r--[-rwxr-xr-x] | test/pacman/pmrule.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py index 0f6ae602..d64f5194 100755..100644 --- a/test/pacman/pmrule.py +++ b/test/pacman/pmrule.py @@ -42,7 +42,7 @@ class pmrule(object): [testname, args] = self.rule.split("=") if testname[0] == "!": self.false = 1 - testname = testname.lstrip("!") + testname = testname[1:] [kind, case] = testname.split("_") if "|" in args: [key, value] = args.split("|", 1) @@ -146,6 +146,14 @@ class pmrule(object): else: print "FILE rule '%s' not found" % case success = -1 + elif kind == "DIR": + filename = os.path.join(test.root, key) + if case == "EXIST": + if not os.path.isdir(filename): + success = 0 + else: + print "DIR rule '%s' not found" % case + success = -1 elif kind == "LINK": filename = os.path.join(test.root, key) if case == "EXIST": |