aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorMattias EngdegÄrd2022-09-23 15:26:13 +0200
committerMattias EngdegÄrd2022-09-23 16:10:06 +0200
commit47b986d4882c0f105fc2129fd06b3f7b48e7ea55 (patch)
tree326e45701f561f49f0df7a4dfa0a1c991f3746c9 /test/src
parentc53f5a2176c9c67e0d1dbc7315c79eb070deaee2 (diff)
downloademacs-47b986d4882c0f105fc2129fd06b3f7b48e7ea55.tar.gz
emacs-47b986d4882c0f105fc2129fd06b3f7b48e7ea55.zip
Remove max-specpdl-size overrun test
* test/src/eval-tests.el (eval-tests--exceed-specbind-limit) (eval-exceed-specbind-with-signal-hook): Remove test that is no longer useful, since there is no longer any specpdl limit to overrun. (The test still passed but vacuously so, by hitting the max-lisp-eval-depth limit instead.) This silences an obsoletion warning.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/eval-tests.el20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el
index 1b2ad99360b..bb2f04e8ee1 100644
--- a/test/src/eval-tests.el
+++ b/test/src/eval-tests.el
@@ -108,26 +108,6 @@ Bug#24912."
108 (should-error (eval (cons 'cond clauses) nil)) 108 (should-error (eval (cons 'cond clauses) nil))
109 (should-error (eval (cons 'cond clauses) t)))) 109 (should-error (eval (cons 'cond clauses) t))))
110 110
111(defun eval-tests--exceed-specbind-limit ()
112 (defvar eval-tests--var1)
113 (defvar eval-tests--var2)
114 ;; Bind two variables, to make extra sure we hit the
115 ;; `max-specpdl-size' limit before the `max-lisp-eval-depth' limit.
116 (let ((eval-tests--var1 1)
117 (eval-tests--var2 2))
118 ;; Recurse until we hit the limit.
119 (eval-tests--exceed-specbind-limit)))
120
121(ert-deftest eval-exceed-specbind-with-signal-hook ()
122 "Test for Bug#30481.
123Check that Emacs doesn't crash when exceeding specbind limit with
124`signal-hook-function' bound. NOTE: Without the fix for
125Bug#30481, this test can appear to pass, but cause a
126crash/abort/malloc assert failure on the next test."
127 (let ((max-specpdl-size (/ max-lisp-eval-depth 2))
128 (signal-hook-function #'ignore))
129 (should-error (eval-tests--exceed-specbind-limit))))
130
131(ert-deftest defvar/bug31072 () 111(ert-deftest defvar/bug31072 ()
132 "Check that Bug#31072 is fixed." 112 "Check that Bug#31072 is fixed."
133 (should-error (eval '(defvar 1) t) :type 'wrong-type-argument)) 113 (should-error (eval '(defvar 1) t) :type 'wrong-type-argument))