X-Git-Url: http://git.hcoop.net/clinton/parenscript.git/blobdiff_plain/604b5bbea9dd9eff7a21a59f2236f0d9374a13db..c8d008ad070b9d28ab90c4da73a920ad52c847d3:/t/ps-tests.lisp diff --git a/t/ps-tests.lisp b/t/ps-tests.lisp index bc60917..291a95e 100644 --- a/t/ps-tests.lisp +++ b/t/ps-tests.lisp @@ -1065,3 +1065,44 @@ x + x;") (symbol-macrolet ((x y)) (return (if x x x))) "return y ? y : y;") + +(test-ps-js flet-apply + (flet ((foo () 'bar)) + (apply (function foo) nil)) + "var foo1 = function () { + 'bar'; +}; +foo1.apply(this, null);") + +(test-ps-js let-apply + (let ((foo (lambda () (return 1)))) + (let ((foo (lambda () (return 2)))) + (apply foo nil))) + "var foo = function () { + return 1; +}; +var foo1 = function () { + return 2; +}; +foo1.apply(this, null);") + +(test-ps-js flet-let + (flet ((x (x) (return (1+ x)))) + (let ((x 2)) + (x x))) + "var x1 = function (x) { + return x + 1; +}; +var x = 2; +x1(x);") + +(test-ps-js let-flet + (let ((x 2)) + (flet ((x (x) (return (1+ x)))) + (x x))) + "var x = 2; +var x1 = function (x) { + return x + 1; +}; +x1(x);") +