diff --git a/impls/tests/step6_file.mal b/impls/tests/step6_file.mal index 2cc0acca7c..08c68b22a0 100644 --- a/impls/tests/step6_file.mal +++ b/impls/tests/step6_file.mal @@ -153,6 +153,23 @@ (let* (b 12) (do (eval (read-string "(def! aa 7)")) aa )) ;=>7 +;; +;; Testing for core fns instead of special forms +(let* [x read-string] (x "(+ 2 3)")) +;=>(+ 2 3) +(let* [x slurp] (x "../tests/test.txt")) +;=>"A line of text\n" +(let* [x atom] (x 7)) +;=>(atom 7) +(let* [x atom?] (x (atom 1))) +;=>true +(let* [x deref] (x (atom 7))) +;=>7 +(let* [x reset!] (x (atom 7) 8)) +;=>8 + (let* [x swap!] (x (atom 6) (fn* (y) (+ y 1)))) +;=>7 + ;>>> soft=True ;>>> optional=True ;; diff --git a/impls/tests/step7_quote.mal b/impls/tests/step7_quote.mal index b757726019..30842ee384 100644 --- a/impls/tests/step7_quote.mal +++ b/impls/tests/step7_quote.mal @@ -158,6 +158,12 @@ b (concat [1 2]) ;=>(1 2) +;; Testing for core fns instead of special forms +(let* [x cons] (x 1 '(2 3))) +;=>(1 2 3) +(let* [x concat] (x '(1) '(2))) +;=>(1 2) + ;>>> optional=True ;; ;; -------- Optional Functionality -------- @@ -294,3 +300,7 @@ a ;/EVAL: \(cons 1 \(concat c \(cons 3 \(\)\)\)\).*\n\(1 1 "b" "d" 3\) (let* (DEBUG-EVAL true) `[]) ;/EVAL: \(vec \(\)\).*\n\[\] + +;; Testing for core fn instead of special-form +(let* [a vec] (a '(1 2 3))) +;=>[1 2 3]