1 ;;; TODO: really a step5 test
3 ;; Testing that (do (do)) not broken by TCO
8 ;; Testing read-string, eval and slurp
9 (read-string "(1 2 (3 4) nil)")
12 (read-string "(+ 2 3)")
15 (read-string "7 ;; comment")
18 ;;; Differing output, but make sure no fatal error
19 (read-string ";; comment")
22 (eval (read-string "(+ 2 3)"))
25 (slurp "../tests/test.txt")
30 (load-file "../tests/inc.mal")
39 ;; Testing that *ARGV* exists and is an empty list
48 (def! inc3 (fn* (a) (+ 3 a)))
77 (swap! a (fn* (a) (* 2 a)))
80 (swap! a (fn* (a b) (* a b)) 10)
86 ;; Testing swap!/closure interaction
87 (def! inc-it (fn* (a) (+ 1 a)))
89 (def! f (fn* () (swap! atm inc-it)))
98 ;; -------- Deferrable/Optional Functionality --------
100 ;; Testing comments in a file
101 (load-file "../tests/incB.mal")
102 ;/"incB.mal finished"
103 ;=>"incB.mal return string"
109 ;; Testing map literal across multiple lines in a file
110 (load-file "../tests/incC.mal")
114 ;; Testing `@` reader macro (short for `deref`)
119 ;;; TODO: really a step5 test
120 ;; Testing that vector params not broken by TCO
124 (def! g (fn* [a] (+ a 78)))
128 ;; Checking that eval does not use local environments.
131 (let* (a 2) (eval (read-string "a")))