aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/emacs-lisp/macroexp-resources/vk.el48
-rw-r--r--test/lisp/erc/resources/erc-d/erc-d-tests.el5
-rw-r--r--test/lisp/help-fns-tests.el10
3 files changed, 33 insertions, 30 deletions
diff --git a/test/lisp/emacs-lisp/macroexp-resources/vk.el b/test/lisp/emacs-lisp/macroexp-resources/vk.el
index 5358bcaeb5c..c59a6b9f8f1 100644
--- a/test/lisp/emacs-lisp/macroexp-resources/vk.el
+++ b/test/lisp/emacs-lisp/macroexp-resources/vk.el
@@ -78,29 +78,31 @@
78 78
79(defconst vk-val3 (eval-when-compile (vk-f3 0))) 79(defconst vk-val3 (eval-when-compile (vk-f3 0)))
80 80
81(defconst vk-f4 '(lambda (x) 81(defconst vk-f4 (eval '(lambda (x)
82 (defvar vk-v4) 82 (defvar vk-v4)
83 (let ((vk-v4 31) 83 (let ((vk-v4 31)
84 (y 32)) 84 (y 32))
85 (ignore vk-v4 x y) 85 (ignore vk-v4 x y)
86 (list 86 (list
87 (vk-variable-kind vk-a) ; dyn 87 (vk-variable-kind vk-a) ; dyn
88 (vk-variable-kind vk-b) ; dyn 88 (vk-variable-kind vk-b) ; dyn
89 (vk-variable-kind vk-v4) ; dyn 89 (vk-variable-kind vk-v4) ; dyn
90 (vk-variable-kind x) ; dyn 90 (vk-variable-kind x) ; dyn
91 (vk-variable-kind y))))) ; dyn 91 (vk-variable-kind y)))) ; dyn
92 92 nil))
93(defconst vk-f5 '(closure (t) (x) 93
94 (defvar vk-v5) 94(defconst vk-f5 (eval '(lambda (x)
95 (let ((vk-v5 41) 95 (defvar vk-v5)
96 (y 42)) 96 (let ((vk-v5 41)
97 (ignore vk-v5 x y) 97 (y 42))
98 (list 98 (ignore vk-v5 x y)
99 (vk-variable-kind vk-a) ; dyn 99 (list
100 (vk-variable-kind vk-b) ; dyn 100 (vk-variable-kind vk-a) ; dyn
101 (vk-variable-kind vk-v5) ; dyn 101 (vk-variable-kind vk-b) ; dyn
102 (vk-variable-kind x) ; lex 102 (vk-variable-kind vk-v5) ; dyn
103 (vk-variable-kind y))))) ; lex 103 (vk-variable-kind x) ; lex
104 (vk-variable-kind y)))) ; lex
105 t))
104 106
105(defun vk-f6 () 107(defun vk-f6 ()
106 (eval '(progn 108 (eval '(progn
diff --git a/test/lisp/erc/resources/erc-d/erc-d-tests.el b/test/lisp/erc/resources/erc-d/erc-d-tests.el
index 78f87399afb..dda1b1ced84 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-tests.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-tests.el
@@ -367,8 +367,9 @@
367 (should (equal (funcall it) "foo3foo"))) 367 (should (equal (funcall it) "foo3foo")))
368 368
369 (ert-info ("Exits clean") 369 (ert-info ("Exits clean")
370 (when (listp (alist-get 'f (erc-d-dialog-vars dialog))) ; may be compiled 370 (when (interpreted-function-p
371 (should (eq 'closure (car (alist-get 'f (erc-d-dialog-vars dialog)))))) 371 (alist-get 'f (erc-d-dialog-vars dialog))) ; may be compiled
372 (should (aref (alist-get 'f (erc-d-dialog-vars dialog)) 2)))
372 (should-not (funcall it)) 373 (should-not (funcall it))
373 (should (equal (erc-d-dialog-vars dialog) 374 (should (equal (erc-d-dialog-vars dialog)
374 `((:a . 1) 375 `((:a . 1)
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index 1beeb77640c..82350a4bc71 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -63,14 +63,14 @@ Return first line of the output of (describe-function-1 FUNC)."
63 (should (string-match regexp result)))) 63 (should (string-match regexp result))))
64 64
65(ert-deftest help-fns-test-lisp-defun () 65(ert-deftest help-fns-test-lisp-defun ()
66 (let ((regexp (if (featurep 'native-compile) 66 (let ((regexp "a \\([^ ]+\\) in .+subr\\.el")
67 "a subr-native-elisp in .+subr\\.el"
68 "a compiled-function in .+subr\\.el"))
69 (result (help-fns-tests--describe-function 'last))) 67 (result (help-fns-tests--describe-function 'last)))
70 (should (string-match regexp result)))) 68 (should (string-match regexp result))
69 (should (member (match-string 1 result)
70 '("subr-native-elisp" "byte-code-function")))))
71 71
72(ert-deftest help-fns-test-lisp-defsubst () 72(ert-deftest help-fns-test-lisp-defsubst ()
73 (let ((regexp "a compiled-function in .+subr\\.el") 73 (let ((regexp "a byte-code-function in .+subr\\.el")
74 (result (help-fns-tests--describe-function 'posn-window))) 74 (result (help-fns-tests--describe-function 'posn-window)))
75 (should (string-match regexp result)))) 75 (should (string-match regexp result))))
76 76