summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJim Porter <jporterbugs@gmail.com>2026-05-18 08:34:50 -0700
committerJim Porter <jporterbugs@gmail.com>2026-05-18 08:37:42 -0700
commitd4cb550dba6c01223167ca71b02698f452f3d141 (patch)
treeb6b87f39378c2ba37c47d354c62085daea5b2f44 /test
parente381cf1fc97fc1c0bab1816476dd6f73a628b238 (diff)
; Improve last change
* test/src/process-tests.el (process-tests/broken-pipe): Use CONNECTION-TYPE. (process-tests/broken-pipe/pipe-all) (process-tests/broken-pipe/pipe-stdin): Skip via 'skip-when'. (process-tests/broken-pipe/pty) (process-tests/broken-pipe/pty-stdin): Remove these invalid tests; EPIPE from a PTY doesn't make sense.
Diffstat (limited to 'test')
-rw-r--r--test/src/process-tests.el23
1 files changed, 9 insertions, 14 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index 1b1a9dfb07f..3048cada03d 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -1073,7 +1073,7 @@ should also run to completion, printing out the line of text it read."
(message "closed stream")
(sit-for 1)
(message "%s" line))))
- :connection-type 'pipe)))
+ :connection-type connection-type)))
(process-send-string proc "hello\n")
(while (not (string-prefix-p "closed stream\n" (buffer-string)))
(accept-process-output))
@@ -1102,20 +1102,15 @@ should also run to completion, printing out the line of text it read."
;; These tests only works when running Emacs interactively, since we
;; don't catch SIGPIPE in batch mode. TODO: Fixing bug#66186 would
;; probably allow running these tests in batch mode.
-(when (not noninteractive)
- (ert-deftest process-tests/broken-pipe/pipe ()
- (process-tests/broken-pipe 'pipe))
+(ert-deftest process-tests/broken-pipe/pipe-all ()
+ (skip-when noninteractive)
+ (process-tests/broken-pipe 'pipe))
- ;; Emacs doesn't support PTYs on MS-Windows.
- (unless (memq system-type '(ms-dos windows-nt))
- (ert-deftest process-tests/broken-pipe/pty ()
- (process-tests/broken-pipe 'pty))
-
- (ert-deftest process-tests/broken-pipe/pipe-stdin ()
- (process-tests/broken-pipe '(pipe . pty)))
-
- (ert-deftest process-tests/broken-pipe/pty-stdin ()
- (process-tests/broken-pipe '(pty . pipe)))))
+(ert-deftest process-tests/broken-pipe/pipe-stdin ()
+ (skip-when (or noninteractive
+ ;; Emacs doesn't support PTYs on MS-Windows.
+ (not (memq system-type '(ms-dos windows-nt)))))
+ (process-tests/broken-pipe '(pipe . pty)))
(ert-deftest process-num-processors ()
"Sanity checks for num-processors."