]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Eshell process tests to (hopefully) work on all platforms
authorJim Porter <jporterbugs@gmail.com>
Fri, 25 Feb 2022 02:18:27 +0000 (03:18 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 25 Feb 2022 02:19:08 +0000 (03:19 +0100)
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline):
Fix test (bug#54136).

test/lisp/eshell/esh-proc-tests.el

index e19eaf9779ba52bedf972d8b0d0228299d1b8a9a..8cd893ce57022d3a653c6354aa51ea7ccbee2a2b 100644 (file)
@@ -57,10 +57,11 @@ prompt.  See bug#54136."
    (let ((output-start (eshell-beginning-of-output)))
      (eshell-kill-process)
      (eshell-wait-for-subprocess t)
-     (should (equal (buffer-substring-no-properties
-                     output-start (eshell-end-of-output))
-                    ;; "interrupt\n" is for MS-Windows.
-                    (or "interrupt\n" "killed\n"))))))
+     (should (string-match-p
+              ;; "interrupt\n" is for MS-Windows.
+              (rx (or "interrupt\n" "killed\n"))
+              (buffer-substring-no-properties
+               output-start (eshell-end-of-output)))))))
 
 (ert-deftest esh-proc-test/kill-pipeline-head ()
   "Test that killing the first process in a pipeline doesn't