Skip to content

Commit d6b77e9

Browse files
committed
Added more tests for uri-template matching, especially with url that contains %2F i.e the percent encoded slash '/'
1 parent fdfeea5 commit d6b77e9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

library/text/parser/uri_template/tests/test_uri_template_matcher.e

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inherit
1515

1616
feature -- Matcher
1717

18-
test_uri_template_matcher
18+
test_uri_template_matcher_01
1919
note
2020
testing: "uri-template"
2121
local
@@ -80,6 +80,19 @@ feature -- Matcher
8080

8181
end
8282

83+
test_uri_template_matcher_02
84+
note
85+
testing: "uri-template"
86+
local
87+
tpl: URI_TEMPLATE
88+
do
89+
create tpl.make ("/test/{vars}")
90+
uri_template_match (tpl, "/test/foo%%2Fbar", <<["vars", "foo%%2Fbar"]>>, <<>>)
91+
92+
create tpl.make ("/test{/vars}")
93+
uri_template_match (tpl, "/test/foo%%2Fbar/abc%%2Fdef", <<["vars", "/foo%%2Fbar/abc%%2Fdef"], ["vars[1]", "foo%%2Fbar"], ["vars[2]", "abc%%2Fdef"]>>, <<>>)
94+
end
95+
8396
feature {NONE} -- Implementations
8497

8598
uri_template_mismatch (a_uri_template: URI_TEMPLATE; a_uri: STRING)

0 commit comments

Comments
 (0)