summaryrefslogtreecommitdiff
path: root/test/src/emacs-module-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/emacs-module-tests.el')
-rw-r--r--test/src/emacs-module-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index de707a4243a..e9f13ba368b 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -299,6 +299,17 @@ during garbage collection."
(mod-test-invalid-finalizer)
(garbage-collect)))
+(ert-deftest module--test-assertions--globref-invalid-free ()
+ "Check that -module-assertions detects invalid freeing of a
+local reference."
+ (skip-unless (or (file-executable-p mod-test-emacs)
+ (and (eq system-type 'windows-nt)
+ (file-executable-p (concat mod-test-emacs ".exe")))))
+ (module--test-assertion
+ (rx "Global value was not found in list of " (+ digit) " globals")
+ (mod-test-globref-invalid-free)
+ (garbage-collect)))
+
(ert-deftest module/describe-function-1 ()
"Check that Bug#30163 is fixed."
(with-temp-buffer