Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

possibly fixed a path pattern compilaction bug, added a commented spe…

…c for :name(.:format)?

(see https://gist.github.com/2154980#gistcomment-169469 on the second part)
  • Loading branch information...
commit 31d640a5b302e5632035781ee831ff980790daa3 1 parent 6404e3d
@floere authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 test/compile_test.rb
View
10 test/compile_test.rb
@@ -83,7 +83,7 @@ class CompileTest < Test::Unit::TestCase
]],
["/:name.?:format?", %r{\A/([^\.%2E/?#]+)(?:\.|%2E)?([^\.%2E/?#]+)?\z}, [
["/foo", ["foo", nil]],
- ["/.bar", [".bar", nil]],
+ ["/.bar", nil],
["/foo.bar", ["foo", "bar"]],
["/foo%2Ebar", ["foo", "bar"]]
]],
@@ -91,7 +91,13 @@ class CompileTest < Test::Unit::TestCase
["/foo@bar", ["foo", "bar"]],
["/foo.foo@bar", ["foo.foo", "bar"]],
["/foo@bar.bar", ["foo", "bar.bar"]]
- ]]
+ ]],
+ # From https://gist.github.com/2154980#gistcomment-169469.
+ #
+ # ["/:name(.:format)?", %r{\A/([^\.%2E/?#]+)(?:\(|%28)(?:\.|%2E)([^\.%2E/?#]+)(?:\)|%29)?\z}, [
+ # ["/foo", ["foo"]],
+ # ["/foo.bar", ["foo", "bar"]]
+ # ]]
].each do |pattern, regexp, examples_expectations|
app = nil
examples_expectations.each do |example, expected|
Please sign in to comment.
Something went wrong with that request. Please try again.