+
+(test-ps-js aref-array-expression
+ (aref (or a b c) 0)
+ "(a || b || c)[0]")
+
+(test-ps-js slot-value-operator
+ (slot-value (or a b c) 'd)
+ "(a || b || c).d")
+
+(test-ps-js slot-value-parens
+ (slot-value (slot-value foo 'bar) 'baz)
+ "foo.bar.baz")
+
+(test-ps-js funcall-funcall
+ ((foo))
+ "foo()()")
+
+(test-ps-js expression-funcall
+ ((or (@ window eval) eval) foo nil)
+ "(window.eval || eval)(foo, null)")
+
+(test-ps-js expression-funcall1
+ (((or (@ window eval) eval) foo nil))
+ "(window.eval || eval)(foo, null)()")
+
+(test-ps-js expression-funcall2
+ (((or (@ window eval) eval)) foo nil)
+ "(window.eval || eval)()(foo, null)")
+
+(test-ps-js slot-value-object-literal
+ (slot-value (create :a 1) 'a)
+ "({ a : 1 }).a")
+
+(test-ps-js slot-value-lambda
+ (slot-value (lambda ()) 'prototype)
+ "(function () { }).prototype")
+
+(test-ps-js who-html1
+ (who-ps-html (:span :class "ticker-symbol"
+ :ticker-symbol symbol
+ (:a :href "http://foo.com"
+ symbol)
+ (:span :class "ticker-symbol-popup")))
+ "'<SPAN CLASS=\"ticker-symbol\" TICKER-SYMBOL=\"' + symbol + '\"><A HREF=\"http://foo.com\">' + symbol + '</A><SPAN CLASS=\"ticker-symbol-popup\"></SPAN></SPAN>'")
+
+(test-ps-js flet1
+ ((lambda () (flet ((foo (x) (return (1+ x)))) (return (foo 1)))))
+ "(function () {
+ var foo = function (x) {
+ return x + 1;
+ };
+ return foo(1);
+})()")
+
+(test-ps-js labels1
+ ((lambda () (labels ((foo (x)
+ (return (if (=== 0 x)
+ 0
+ (+ x (foo (1- x)))))))
+ (return (foo 3)))))
+ "(function () {
+ var foo = function foo(x) {
+ return 0 === x ? 0 : x + foo(x - 1);
+ };
+ return foo(3);
+})()")
+
+(test-ps-js for-loop-var-init-exp
+ ((lambda (x)
+ (return (do* ((y (if x 0 1) (1+ y))
+ (z 0 (1+ z)))
+ ((= y 3) z))))
+ true)
+ "(function (x) {
+ return (function () {
+ for (var y = x ? 0 : 1, z = 0; y != 3; y += 1, z += 1) {
+ };
+ return z;
+ })();
+})(true)")
+
+(test-ps-js math-pi
+ pi
+ "Math.PI")
+
+(test-ps-js literal-array
+ '(1 2 3)
+ "[1, 2, 3]")
+
+(test-ps-js literal-array-1
+ '(1 foo 3)
+ "[1, 'foo', 3]")
+
+(test ps-lisp-expands-in-lexical-environment
+ (is (string= "5;" (let ((x 5)) (ps (lisp x))))))
+
+(test ps*-lisp-expands-in-null-lexical-environment
+ (signals error (let ((x 5)) (declare (ignore x)) (ps* '(lisp x)))))
+
+(test ps*-lisp-expands-in-dynamic-environment
+ (is (string= "1 + 2;" (let ((*print-level* 2)) (ps* '(+ 1 (lisp *print-level*)))))))
+
+(test ps-lisp-dynamic-environment
+ (is (string= "1 + 2;" (let ((*print-level* 2)) (ps (+ 1 (lisp *print-level*)))))))
+
+(test-ps-js ps-js-target-version-keyword-test1
+ (defun foo (x y &key bar baz))
+ "function foo(x, y) {
+ var x1 = Array.prototype.indexOf.call(arguments, 'bar', 2);
+ var bar = -1 == x1 ? null : arguments[x1 + 1];
+ var x2 = Array.prototype.indexOf.call(arguments, 'baz', 2);
+ var baz = -1 == x2 ? null : arguments[x2 + 1];
+}"
+ :js-target-version 1.6)