summaryrefslogtreecommitdiff
path: root/doc/plugins/testpagespec.mdwn
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-27 08:34:09 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-04-27 08:34:09 +0000
commit8fa8bd0adb034f05131648dcb7b14011672649e8 (patch)
treeec95c4ffe3c3990bb322aafdb81071836c9af49a /doc/plugins/testpagespec.mdwn
parentf8a7fb227b59463b37180b1e525c5d19ec0e43cb (diff)
the kind of perl code that can only be written at 4:30 am
(Get a good message when a PageSpec fails due to a negated success by creating success objects with a reason string, which morph into failure objects when negated.)
Diffstat (limited to 'doc/plugins/testpagespec.mdwn')
-rw-r--r--doc/plugins/testpagespec.mdwn16
1 files changed, 13 insertions, 3 deletions
diff --git a/doc/plugins/testpagespec.mdwn b/doc/plugins/testpagespec.mdwn
index 28e5ba7a7..c5155129d 100644
--- a/doc/plugins/testpagespec.mdwn
+++ b/doc/plugins/testpagespec.mdwn
@@ -2,11 +2,21 @@
[[tag type/useful]]
This plugin allows testing a [[PageSpec]] to see if it matches a page, and
-if not, why it fails to match.
+to see the part that matches, or causes the match to fail.
-Example use:
+Example uses:
\[[testpagespec pagespec="foopage and barpage" match="foopage"]]
-This will print out something like "barpage does not match foopage",
+This will print out something like "no match: barpage does not match foopage",
highlighting which part of the [[PageSpec]] is causing the match to fail.
+
+ \[[testpagespec pagespec="foopage or !bar*" match="barpage"]]
+
+This will print out something like "no match: bar* matches barpage", since the part
+of the [[PageSpec]] that fails is this negated match.
+
+ \[[testpagespec pagespec="foopage or barpage" match="barpage"]]
+
+This will print out something like "match: barpage matches barpage",
+indicating the part of the [[PageSpec]] that did match.