diff options
Diffstat (limited to 'test/src/process-tests.el')
| -rw-r--r-- | test/src/process-tests.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 5dbf441e8c2..0bb7ebe50a8 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el | |||
| @@ -215,6 +215,26 @@ | |||
| 215 | (string-to-list "stdout\n") | 215 | (string-to-list "stdout\n") |
| 216 | (string-to-list "stderr\n")))))) | 216 | (string-to-list "stderr\n")))))) |
| 217 | 217 | ||
| 218 | (ert-deftest make-process-w32-debug-spawn-error () | ||
| 219 | "Check that debugger runs on `make-process' failure (Bug#33016)." | ||
| 220 | (skip-unless (eq system-type 'windows-nt)) | ||
| 221 | (let* ((debug-on-error t) | ||
| 222 | (have-called-debugger nil) | ||
| 223 | (debugger (lambda (&rest _) | ||
| 224 | (setq have-called-debugger t) | ||
| 225 | ;; Allow entering the debugger later in the same | ||
| 226 | ;; test run, before going back to the command | ||
| 227 | ;; loop. | ||
| 228 | (setq internal-when-entered-debugger -1)))) | ||
| 229 | (should (eq :got-error ;; NOTE: `should-error' would inhibit debugger. | ||
| 230 | (condition-case-unless-debug () | ||
| 231 | ;; Emacs doesn't search for absolute filenames, so | ||
| 232 | ;; the error will be hit in the w32 process spawn | ||
| 233 | ;; code. | ||
| 234 | (make-process :name "test" :command '("c:/No-Such-Command")) | ||
| 235 | (error :got-error)))) | ||
| 236 | (should have-called-debugger))) | ||
| 237 | |||
| 218 | (ert-deftest make-process/file-handler/found () | 238 | (ert-deftest make-process/file-handler/found () |
| 219 | "Check that the ‘:file-handler’ argument of ‘make-process’ | 239 | "Check that the ‘:file-handler’ argument of ‘make-process’ |
| 220 | works as expected if a file name handler is found." | 240 | works as expected if a file name handler is found." |