Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pacman/pmrule.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py
index 59293266..aef73cdb 100644
--- a/test/pacman/pmrule.py
+++ b/test/pacman/pmrule.py
@@ -181,6 +181,16 @@ class pmrule(object):
if not pkg or not os.path.isfile(
os.path.join(cachedir, pkg.filename())):
success = 0
+ elif case == "FEXISTS":
+ if not os.path.isfile(os.path.join(cachedir, key)):
+ success = 0
+ elif case == "FCONTENTS":
+ filename = os.path.join(cachedir, key)
+ try:
+ with open(filename, 'r') as f:
+ success = f.read() == value
+ except:
+ success = 0
else:
tap.diag("Rule kind '%s' not found" % kind)
success = -1