From 8abca179d0997f9448f96e5bae7b0f7bc4330711 Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Sat, 9 Feb 2019 16:04:41 +0200 Subject: [PATCH] Test unicode chars --- test/cljc/reitit/core_test.cljc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/cljc/reitit/core_test.cljc b/test/cljc/reitit/core_test.cljc index 6f266816..96a48277 100644 --- a/test/cljc/reitit/core_test.cljc +++ b/test/cljc/reitit/core_test.cljc @@ -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"