fix: Clojure str/pr-str semantics (nil->'', keywords ':b', symbols, collections render with reader syntax); fix incorrect str-nil test

This commit is contained in:
Yogthos 2026-06-04 14:33:45 -04:00
parent cbc610c665
commit 08de360315
4 changed files with 66 additions and 13 deletions

View file

@ -89,7 +89,7 @@
(assert (= "hello" (ct-eval ctx "(str \"hello\")")) "str")
(assert (= "ab" (ct-eval ctx "(str \"a\" \"b\")")) "str two")
(assert (= "42" (ct-eval ctx "(str 42)")) "str number")
(assert (= "nil" (ct-eval ctx "(str nil)")) "str nil")
(assert (= "" (ct-eval ctx "(str nil)")) "str nil -> empty string (Clojure semantics)")
(assert (= "a" (ct-eval ctx "(name :a)")) "name"))
(print " passed")
(print "9: apply...")