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.el16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 2aa85f0b247..6a7ba5580da 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -208,14 +208,22 @@ must evaluate to a regular expression string."
(with-temp-buffer
(let* ((default-directory tempdir)
(status (call-process mod-test-emacs nil t nil
- "-batch" "-Q" "-module-assertions" "-eval"
+ "-batch" "-Q" "-module-assertions"
+ "-eval" "(setq w32-disable-abort-dialog t)"
+ "-eval"
,(prin1-to-string
`(progn
(require 'mod-test ,mod-test-file)
,@body)))))
- (should (stringp status))
- ;; eg "Aborted" or "Abort trap: 6"
- (should (string-prefix-p "Abort" status))
+ ;; Aborting doesn't raise a signal on MS-DOS/Windows, but
+ ;; rather exits with a non-zero status: 2 on MS-DOS (see
+ ;; msdos.c:msdos_abort), 3 on Windows, per MSDN documentation
+ ;; of 'abort'.
+ (if (memq system-type '(ms-dos windows-nt))
+ (should (>= status 2))
+ (should (stringp status))
+ ;; eg "Aborted" or "Abort trap: 6"
+ (should (string-prefix-p "Abort" status)))
(search-backward "Emacs module assertion: ")
(goto-char (match-end 0))
(should (string-match-p ,pattern