diff options
| author | Joel Martin <github@martintribe.org> | 2014-10-27 23:49:11 -0500 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-01-06 21:59:01 -0600 |
| commit | b554fd4ed035396886c673778d60659085d8b286 (patch) | |
| tree | 09c309842066a6122563a725fd801c16732724e9 /tests | |
| parent | 77b2da6cf337bbd85914619bfbccba69b6621a04 (diff) | |
| download | mal-b554fd4ed035396886c673778d60659085d8b286.tar.gz mal-b554fd4ed035396886c673778d60659085d8b286.zip | |
rust: fix quote/quasiquote of vectors.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/step7_quote.mal | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/tests/step7_quote.mal b/tests/step7_quote.mal index 38dac01..979b4a9 100644 --- a/tests/step7_quote.mal +++ b/tests/step7_quote.mal @@ -47,9 +47,6 @@ ;=>(1 b 3) `(1 ~b 3) ;=>(1 (1 "b" "d") 3) -;;; TODO: fix this -;;;`[1 ~b 3] -;;;;=>[1 (1 "b" "d") 3] ;; Testing splice-unquote @@ -59,9 +56,6 @@ ;=>(1 c 3) `(1 ~@c 3) ;=>(1 1 "b" "d" 3) -;;; TODO: fix this -;;;`[1 ~@c 3] -;;;;=>[1 1 "b" "d" 3] ;; Testing symbol equality @@ -78,3 +72,22 @@ ;;; TODO: needs expect line length fix ;;;((fn* [q] (quasiquote ((unquote q) (quote (unquote q))))) (quote (fn* [q] (quasiquote ((unquote q) (quote (unquote q))))))) ;;;=>((fn* [q] (quasiquote ((unquote q) (quote (unquote q))))) (quote (fn* [q] (quasiquote ((unquote q) (quote (unquote q))))))) + +;; +;; -------- Optional Functionality -------- + +;; Testing unquote with vectors +(def! a 8) +;=>8 +`[1 a 3] +;=>(1 a 3) +;;; TODO: fix this +;;;;=>[1 a 3] + +;; Testing splice-unquote with vectors +(def! c '(1 "b" "d")) +;=>(1 "b" "d") +`[1 ~@c 3] +;=>(1 1 "b" "d" 3) +;;; TODO: fix this +;;;;=>[1 1 "b" "d" 3] |
