Permalink
Browse files

pattern-test

  • Loading branch information...
1 parent cca0f50 commit 1bd833b511df833a32d3083f7e07f98e2d4d7426 @saambarati committed Dec 2, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/test-pattern.js
View
@@ -47,3 +47,11 @@ assert(match('/prefix') === false)
assert(match('/prefix-') === false)
assert(match('/prefix-a') === true)
+match = maple.pattern('/trail/')
+assert(match('/trail') === false)
+assert(match('/trail/') === true)
+
+//optional
+match = maple.pattern('/trail/?')
+assert(match('/trail') === true)
+assert(match('/trail/') === true)

0 comments on commit 1bd833b

Please sign in to comment.