[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 3e65059af7 3/7: Add func-arity tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 3e65059af7 3/7: Add func-arity tests |
Date: |
Tue, 3 Jan 2023 09:57:27 -0500 (EST) |
branch: externals/compat
commit 3e65059af71db18970c148aa227026dfd526ac5a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add func-arity tests
---
compat-tests.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/compat-tests.el b/compat-tests.el
index 8c48733b96..86471caf74 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1817,6 +1817,17 @@ being compared against."
(expect wrong-type-argument '(0 0 0 0 a))
(expect wrong-type-argument '(0 0 0 0 0 a)))
+(compat-deftests func-arity
+ (should (equal '(0 . 0) (func-arity (lambda ()))))
+ (should (equal '(1 . 1) (func-arity (lambda (x) x))))
+ (should (equal '(1 . 2) (func-arity (lambda (x &optional _) x))))
+ (should (equal '(0 . many) (func-arity (lambda (&rest _)))))
+ (ought '(1 . 1) 'identity)
+ (ought '(0 . many) 'ignore)
+ (ought '(2 . many) 'defun)
+ (ought '(2 . 3) 'defalias)
+ (ought '(1 . unevalled) 'defvar))
+
(compat-deftests subr-primitive-p
(ought t (symbol-function 'identity)) ;function from fns.c
(unless (fboundp 'subr-native-elisp-p)
- [elpa] externals/compat updated (be4595fec8 -> d4624d9aed), ELPA Syncer, 2023/01/03
- [elpa] externals/compat d375a95a7a 2/7: Update CI, separate compile and test run, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 84635968be 6/7: Oh dear, also directory-files-recursively is broken, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 3c81fa3325 1/7: Ensure that tests are interpreted, ELPA Syncer, 2023/01/03
- [elpa] externals/compat da865d68cb 5/7: directory-files-recursively: Add test, ELPA Syncer, 2023/01/03
- [elpa] externals/compat 3e65059af7 3/7: Add func-arity tests,
ELPA Syncer <=
- [elpa] externals/compat 3e48e93ef8 4/7: Disable broken func-arity test for now, ELPA Syncer, 2023/01/03
- [elpa] externals/compat d4624d9aed 7/7: Always load prefixed definitions, ELPA Syncer, 2023/01/03