From b79594d304efcb94c623ee33a0f8c2d2e8921b12 Mon Sep 17 00:00:00 2001
From: Boris Smilga <boris.smilga@gmail.com>
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 files changed, 16 insertions(+), 0 deletions(-)

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/;")
-- 
1.7.5.4

