Changed ps-inline to take a form instead of an implicit progn as a parameter; gave...
[clinton/parenscript.git] / t / ps-tests.lisp
index fe6112c..d31f801 100644 (file)
@@ -395,7 +395,7 @@ x = 2 + sideEffect() + x + 5;")
                      :onclick (lisp (ps-inline (transport))))
                  img))
        img))
-  "document.write(LINKORNOT == 1 ? '<a href=\"#\" onclick=\"' + 'javascript:transport();' + '\">' + img + '</a>' : img)")
+  "document.write(LINKORNOT == 1 ? '<a href=\"#\" onclick=\"' + 'javascript:transport()' + '\">' + img + '</a>' : img)")
 
 (test-ps-js negate-number-literal ;; ok, this was broken and fixed before, but no one bothered to add the test!
   (- 1)
@@ -421,4 +421,18 @@ x = 2 + sideEffect() + x + 5;")
                (declare (ignore bar baz))
                (format nil "~a" foo)))
     (foo 1 2))
-  "'(FOO 1 2)';")
\ No newline at end of file
+  "'(FOO 1 2)';")
+
+(test-ps-js keyword-consistent
+  :x
+  "x")
+
+(test-ps-js simple-symbol-macrolet
+  (symbol-macrolet ((x 1)) x)
+  "1;")
+
+(test-ps-js compound-symbol-macrolet
+  (symbol-macrolet ((x 123)
+                    (y (* 2 x)))
+     y)
+  "2 * 123;")