From 10e637b427e5cdd9b5b6660469391cac525da637 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Mon, 14 Sep 2009 14:06:50 +0000 Subject: Unescape matches option + some unit tests git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@245 119bf307-c92d-0410-89bd-8f53e6181181 --- chrome/content/unittests.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 chrome/content/unittests.js (limited to 'chrome/content/unittests.js') diff --git a/chrome/content/unittests.js b/chrome/content/unittests.js new file mode 100644 index 0000000..c532d3f --- /dev/null +++ b/chrome/content/unittests.js @@ -0,0 +1,12 @@ + +var tests = { + "Wildcard matches" : { + run : function(data) { return redirector.wildcardMatch(data[0], data[1], 'abc', false); }, + describe : function(data) { return data[0] + ' matches ' + data[1]; }, + tests : [ + ['http://foo*', 'http://foobar.is'], + ['http://foo*', 'http://foo'], + ['*foo*', 'http://foo'] + ] + } +}; -- cgit v1.2.3-70-g09d2