From b554fd4ed035396886c673778d60659085d8b286 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Mon, 27 Oct 2014 23:49:11 -0500 Subject: rust: fix quote/quasiquote of vectors. --- tests/step7_quote.mal | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'tests') 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] -- cgit v1.2.3