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 ;;; TODO: fix newline matching so that this works
26 ;;;(slurp "../tests/test.txt")
27 ;;;;=>"A line of text\n"
32 (load-file "../tests/inc.mal")
41 ;; Testing that *ARGV* exists and is an empty list
50 (def! inc3 (fn* (a) (+ 3 a)))
79 (swap! a (fn* (a) (* 2 a)))
82 (swap! a (fn* (a b) (* a b)) 10)
88 ;; Testing swap!/closure interaction
89 (def! inc-it (fn* (a) (+ 1 a)))
91 (def! f (fn* [] (swap! atm inc-it)))
97 ;; -------- Optional Functionality --------
99 ;; Testing comments in a file
100 (load-file "../tests/incB.mal")
101 ; "incB.mal finished"
102 ;=>"incB.mal return string"
108 ;; Testing map literal across multiple lines in a file
109 (load-file "../tests/incC.mal")
113 ;; Testing `@` reader macro (short for `deref`)
118 ;;; TODO: really a step5 test
119 ;; Testing that vector params not broken by TCO
123 (def! g (fn* [a] (+ a 78)))