diff options
author | Einar Egilsson | 2009-09-14 14:06:50 +0000 |
---|---|---|
committer | Einar Egilsson | 2009-09-14 14:06:50 +0000 |
commit | 10e637b427e5cdd9b5b6660469391cac525da637 (patch) | |
tree | da323d35e5f6c0eea7112e7dc87103205f89d59c /chrome/content/unittests.js | |
parent | 8f42f80d0d6de5eb904843b4fbb9a2e0968f7046 (diff) |
Unescape matches option + some unit tests
git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@245 119bf307-c92d-0410-89bd-8f53e6181181
Diffstat (limited to 'chrome/content/unittests.js')
-rw-r--r-- | chrome/content/unittests.js | 12 |
1 files changed, 12 insertions, 0 deletions
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']
+ ]
+ }
+};
|