From: Andrea Corallo Date: Wed, 17 Jun 2020 20:46:48 +0000 (+0200) Subject: * Add a func-arity test for dynamic functions X-Git-Tag: emacs-28.0.90~2727^2~557 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1179a1c748f7c18b8b82f14608f8f86790814a25;p=emacs.git * Add a func-arity test for dynamic functions * test/src/comp-tests.el (comp-tests-dynamic-arity): New test. --- diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index d6fff8233c0..51586d2f9e8 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -563,4 +563,15 @@ https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00914.html." (should (equal (comp-tests-ffuncall-callee-opt-rest-dyn-f 1 2 3 4) '(1 2 3 (4))))) +(ert-deftest comp-tests-dynamic-arity () + "Test func-arity on dynamic scope functions." + (should (equal '(2 . 2) + (func-arity #'comp-tests-ffuncall-callee-dyn-f))) + (should (equal '(2 . 4) + (func-arity #'comp-tests-ffuncall-callee-opt-dyn-f))) + (should (equal '(2 . many) + (func-arity #'comp-tests-ffuncall-callee-rest-dyn-f))) + (should (equal '(2 . many) + (func-arity #'comp-tests-ffuncall-callee-opt-rest-dyn-f)))) + ;;; comp-tests.el ends here