Add a test for /{foo}.html style routes

Just like path `///` would not match `/{foo}/`, `/..html` does not match
`/{foo}.html`.
This commit is contained in:
Miikka Koskinen 2021-10-06 20:42:09 +03:00
parent 8694d312f8
commit 9160aa0f2b

View file

@ -121,6 +121,7 @@
:foo/bar "ei/toista/kertaa"}]
(by-path "/olipa/kerran/avaruus/vaan/ei/toista/kertaa")))
(is (= [::html {:name "10"}] (by-path "/files/file-10.html")))
(is (= [nil nil] (by-path "/files/file-..html")))
(is (= [::loru {:eskon "viitan", :saum "aa"}] (by-path "/viitan/aa/pium\u2215paum")))
(is (= [nil nil] (by-path "/ei/osu/pium/paum")))
(is (= [::emoji {:🌈 "brackets"}] (by-path "/brackets🤔/🎈")))