mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
Test unicode chars
This commit is contained in:
parent
ae1a8f7919
commit
8abca179d0
1 changed files with 5 additions and 2 deletions
|
|
@ -100,7 +100,8 @@
|
|||
["/abba/{dabba}/boo" ::boo]
|
||||
["/{a/jabba}/{a.b/dabba}/{a.b.c/doo}/{a.b.c.d/daa}/{*foo/bar}" ::wild]
|
||||
["/files/file-{name}.html" ::html]
|
||||
["/files/file-{name}.json" ::json]]
|
||||
["/files/file-{name}.json" ::json]
|
||||
["/{eskon}/{saum}/pium\u2215paum" ::loru]]
|
||||
{:router r})
|
||||
by-path #(-> router (r/match-by-path %) ((juxt (comp :name :data) :path-params)))]
|
||||
(is (= [::abba {:abba "abba"}] (by-path "/abba")))
|
||||
|
|
@ -116,7 +117,9 @@
|
|||
:a.b.c.d/daa "vaan"
|
||||
: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 (= [::html {:name "10"}] (by-path "/files/file-10.html")))
|
||||
(is (= [::loru {:eskon "viitan", :saum "aa"}] (by-path "/viitan/aa/pium\u2215paum")))
|
||||
(is (= [nil nil] (by-path "/ei/osu/pium/paum")))))
|
||||
|
||||
(testing "invalid syntax fails fast"
|
||||
(testing "unbalanced brackets"
|
||||
|
|
|
|||
Loading…
Reference in a new issue