From b8fbf2674c46f4b0b03bd36611154ac42dac1d15 Mon Sep 17 00:00:00 2001 From: Boris Smilga Date: Fri, 19 Oct 2012 03:12:33 +0400 Subject: [PATCH] Unit tests for APPLY as used with object methods. --- t/output-tests.lisp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/t/output-tests.lisp b/t/output-tests.lisp index 5e7004c..090339a 100644 --- a/t/output-tests.lisp +++ b/t/output-tests.lisp @@ -123,6 +123,22 @@ (create 'test "bang" 'symbol-saved-my-life "parenscript") "({ 'test' : 'bang', 'symbolSavedMyLife' : 'parenscript' });") +(test-ps-js object-method-apply-1 + (apply (@ an-object foo) nil) + "(function () { + var _js1 = anObject; + var _js2 = _js1.foo; + return _js2.apply(_js1, null); + })();") + +(test-ps-js object-method-apply-2 + (apply (getprop (make-an-object) foo 'bar) nil) + "(function () { + var _js1 = makeAnObject()[foo]; + var _js2 = _js1.bar; + return _js2.apply(_js1, null); + })();") + (test-ps-js regular-expression-literals-1 (regex "foobar") "/foobar/;") -- 2.11.4.GIT