From 9160aa0f2bcb629b949e098703e31571f8072f90 Mon Sep 17 00:00:00 2001 From: Miikka Koskinen Date: Wed, 6 Oct 2021 20:42:09 +0300 Subject: [PATCH] Add a test for `/{foo}.html` style routes Just like path `///` would not match `/{foo}/`, `/..html` does not match `/{foo}.html`. --- test/cljc/reitit/core_test.cljc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cljc/reitit/core_test.cljc b/test/cljc/reitit/core_test.cljc index c1161931..290e46ab 100644 --- a/test/cljc/reitit/core_test.cljc +++ b/test/cljc/reitit/core_test.cljc @@ -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🤔/🎈")))