aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-match-pattern.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-02 01:14:36 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-03-02 01:14:36 +0100
commit41ffab7b32df1756e78af92ff68ff40afb75e1d5 (patch)
tree3bcddc3dfaa9f6ad7afbd0cf31f09d6bceb8e208 /tests/test-match-pattern.js
parent273765aa78125b2106218ad554e6dedad7d2b381 (diff)
parent52bcf6e79eb3085b598a9ca0d21f60879a0e3706 (diff)
downloadbugzilla-triage-41ffab7b32df1756e78af92ff68ff40afb75e1d5.tar.gz
Merge branch 'pageMod' into next
Conflicts: lib/bzpage.js
Diffstat (limited to 'tests/test-match-pattern.js')
-rw-r--r--tests/test-match-pattern.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test-match-pattern.js b/tests/test-match-pattern.js
new file mode 100644
index 0000000..ed51b43
--- /dev/null
+++ b/tests/test-match-pattern.js
@@ -0,0 +1,11 @@
+var { MatchPattern } = require("match-pattern");
+
+exports.ensureMatchPattern = function (test) {
+ var pattern = new MatchPattern("https://bugzilla.redhat.com/attachment.cgi");
+ console.log("pattern = " + pattern);
+ test.assert(pattern.
+ test("https://bugzilla.redhat.com/attachment.cgi"), "testing match pattern");
+ test.assert(!pattern.
+ test("https://bugzilla.redhat.com/attachment.cgi?bugid=676538&action=enter"),
+ "testing failing match pattern");
+};