Added more tests for uri-template matching, especially with url that contains %2F i.e the percent encoded slash '/'
This commit is contained in:
@@ -15,7 +15,7 @@ inherit
|
|||||||
|
|
||||||
feature -- Matcher
|
feature -- Matcher
|
||||||
|
|
||||||
test_uri_template_matcher
|
test_uri_template_matcher_01
|
||||||
note
|
note
|
||||||
testing: "uri-template"
|
testing: "uri-template"
|
||||||
local
|
local
|
||||||
@@ -80,6 +80,19 @@ feature -- Matcher
|
|||||||
|
|
||||||
end
|
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
|
feature {NONE} -- Implementations
|
||||||
|
|
||||||
uri_template_mismatch (a_uri_template: URI_TEMPLATE; a_uri: STRING)
|
uri_template_mismatch (a_uri_template: URI_TEMPLATE; a_uri: STRING)
|
||||||
|
|||||||
Reference in New Issue
Block a user