aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-11-03 22:29:51 -0600
committerJoel Martin <github@martintribe.org>2015-01-09 16:16:45 -0600
commitf947d503f748fd1218f502ef1394ff9e28175ef8 (patch)
tree732223892a330b317c78320a09469be7d0f49f31 /tests
parent36737ae57ee106be16426bf9ef088380421ca0ec (diff)
downloadmal-f947d503f748fd1218f502ef1394ff9e28175ef8.tar.gz
mal-f947d503f748fd1218f502ef1394ff9e28175ef8.zip
R: atom support, fixes for self-hosting.
Diffstat (limited to 'tests')
-rw-r--r--tests/step4_if_fn_do.mal2
-rw-r--r--tests/step6_file.mal5
-rw-r--r--tests/step8_macros.mal7
-rw-r--r--tests/step9_try.mal2
4 files changed, 16 insertions, 0 deletions
diff --git a/tests/step4_if_fn_do.mal b/tests/step4_if_fn_do.mal
index 51ddbe9..ee30ea3 100644
--- a/tests/step4_if_fn_do.mal
+++ b/tests/step4_if_fn_do.mal
@@ -62,6 +62,8 @@
(= 2 (+ 1 1))
;=>true
(= nil 1)
+;=>false
+(= nil nil)
;=>true
(> 2 1)
diff --git a/tests/step6_file.mal b/tests/step6_file.mal
index 8198391..f102c34 100644
--- a/tests/step6_file.mal
+++ b/tests/step6_file.mal
@@ -22,6 +22,11 @@
;=>12
;;
+;; Testing that (do (do)) not broken by TCO
+(do (do 1 2))
+;=>2
+
+;;
;; -------- Optional Functionality --------
(load-file "../tests/incB.mal")
diff --git a/tests/step8_macros.mal b/tests/step8_macros.mal
index 93f3ea9..f2f62dc 100644
--- a/tests/step8_macros.mal
+++ b/tests/step8_macros.mal
@@ -15,6 +15,13 @@
;=>(8 9)
+;; Testing non-macro function
+(not (= 1 1))
+;=>false
+;;; This should fail if it is a macro
+(not (= 1 2))
+;=>true
+
;; Testing trivial macros
(defmacro! one (fn* () 1))
diff --git a/tests/step9_try.mal b/tests/step9_try.mal
index f5bcb58..aee7908 100644
--- a/tests/step9_try.mal
+++ b/tests/step9_try.mal
@@ -61,6 +61,8 @@
;=>6
(map double nums)
;=>(2 4 6)
+(map (fn* [x] (symbol? x)) (list 1 (symbol "two") "three"))
+;=>(false true false)
;;
;; Testing read-str and eval