Skip to content

Commit b3b6312

Browse files
author
Yannick Scherer
committed
[#54] add test for namespaced Clojure maps.
1 parent 1ea5350 commit b3b6312

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/rewrite_clj/parser_test.clj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,16 @@
231231
";\n"
232232
";;\n"))
233233

234+
(deftest t-parsing-namespaced-maps
235+
(are [?s]
236+
(let [n (p/parse-string ?s)]
237+
(is (= :namespaced-map (node/tag n)))
238+
(is (= (count ?s) (node/length n)))
239+
(is (= ?s (node/string n)))
240+
(is (= {:abc/x 1, :abc/y 1} (node/sexpr n))))
241+
"#:abc{:x 1, :y 1}"
242+
"#:abc {:x 1, :y 1}"))
243+
234244
(deftest t-parsing-exceptions
235245
(are [?s ?p]
236246
(is (thrown? Exception ?p (p/parse-string ?s)))

0 commit comments

Comments
 (0)