]> git.eshelyaron.com Git - emacs.git/commitdiff
add comp-tests-ffuncall-lambda-f test
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sun, 30 Jun 2019 19:01:28 +0000 (21:01 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:33:48 +0000 (11:33 +0100)
test/src/comp-tests.el

index 42e10ba511481037e8a121308647f17963f10f97..7bd4ddf01ca5b34a1bd5a9843490bb390fee1c25 100644 (file)
   (byte-compile #'comp-tests-ffuncall-apply-many-f)
   (native-compile #'comp-tests-ffuncall-apply-many-f)
 
-  (should (equal (comp-tests-ffuncall-apply-many-f '(1 2 3)) '(1 2 3))))
+  (should (equal (comp-tests-ffuncall-apply-many-f '(1 2 3)) '(1 2 3)))
+
+  (defun comp-tests-ffuncall-lambda-f (x)
+    (let ((fun (lambda (x)
+                 (1+ x))))
+      (funcall fun x)))
+
+  (byte-compile #'comp-tests-ffuncall-lambda-f)
+  (native-compile #'comp-tests-ffuncall-lambda-f)
+
+  (should (= (comp-tests-ffuncall-lambda-f 1) 2)))
 
 (ert-deftest  comp-tests-conditionals ()
   "Testing conditionals."