Added more tests for uri-template matching, especially with url that contains %2F i.e the percent encoded slash '/'

This commit is contained in:
2014-04-22 19:25:07 +02:00
parent fdfeea508e
commit d6b77e938b

View File

@@ -15,7 +15,7 @@ inherit
feature -- Matcher
test_uri_template_matcher
test_uri_template_matcher_01
note
testing: "uri-template"
local
@@ -80,6 +80,19 @@ feature -- Matcher
end
test_uri_template_matcher_02
note
testing: "uri-template"
local
tpl: URI_TEMPLATE
do
create tpl.make ("/test/{vars}")
uri_template_match (tpl, "/test/foo%%2Fbar", <<["vars", "foo%%2Fbar"]>>, <<>>)
create tpl.make ("/test{/vars}")
uri_template_match (tpl, "/test/foo%%2Fbar/abc%%2Fdef", <<["vars", "/foo%%2Fbar/abc%%2Fdef"], ["vars[1]", "foo%%2Fbar"], ["vars[2]", "abc%%2Fdef"]>>, <<>>)
end
feature {NONE} -- Implementations
uri_template_mismatch (a_uri_template: URI_TEMPLATE; a_uri: STRING)