Subject: Re: bug#54136: 29.0.50; Eshell emits extra prompts when killing processes in some cases

From: Eli Zaretskii <[email-masked]>
Date: Thu, 24 Feb 2022 13:03:36 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Thu, 24 Feb 2022 10:35:32 +0100
> Cc: [email-masked]
> 
> Jim Porter <[email-masked]> writes:
> 
> > Ok, here's the patch with some tests.
> 
> Thanks; pushed to Emacs 29.

The new tests fail on MS-Windows.  Does the patch below look right?
I'm quite sure about the "sh" vs "sh.exe" part, but what about the
"killed" vs "interrupt" part? any idea why this happens on MS-Windows?

diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el
index a8be0f8..3f67961 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -59,7 +59,7 @@ esh-proc-test/kill-pipeline
      (eshell-wait-for-subprocess t)
      (should (equal (buffer-substring-no-properties
                      output-start (eshell-end-of-output))
-                    "killed\n")))))
+                    (or "interrupt\n" "killed\n"))))))
 
 (ert-deftest esh-proc-test/kill-pipeline-head ()
   "Test that killing the first process in a pipeline doesn't
@@ -88,4 +88,4 @@ esh-proc-test/kill-background-process
    (kill-process (caar eshell-process-list))
    ;; Give `eshell-sentinel' a chance to run.
    (sit-for 0.1)
-   (eshell-match-result "\\[sh\\] [[:digit:]]+\n")))
+   (eshell-match-result "\\[sh\\(\\.exe\\)?\\] [[:digit:]]+\n")))