[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a77204c646: ; Fix Eshell tests on macOS
From: |
Jim Porter |
Subject: |
master a77204c646: ; Fix Eshell tests on macOS |
Date: |
Fri, 30 Dec 2022 13:41:56 -0500 (EST) |
branch: master
commit a77204c64659147794b1c9f4114091a257205a49
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Jim Porter <jporterbugs@gmail.com>
; Fix Eshell tests on macOS
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/if-statement-pipe)
(esh-cmd-test/if-else-statement-pipe):
* test/lisp/eshell/esh-io-tests.el (esh-io-test/pipeline/subcommands):
Allow trailing newlines in the output.
---
test/lisp/eshell/esh-cmd-tests.el | 30 ++++++++++++++++--------------
test/lisp/eshell/esh-io-tests.el | 5 +++--
2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/test/lisp/eshell/esh-cmd-tests.el
b/test/lisp/eshell/esh-cmd-tests.el
index cc40dde355..42d24967ff 100644
--- a/test/lisp/eshell/esh-cmd-tests.el
+++ b/test/lisp/eshell/esh-cmd-tests.el
@@ -274,24 +274,26 @@ This tests when `eshell-lisp-form-nil-is-failure' is nil."
(ert-deftest esh-cmd-test/if-statement-pipe ()
"Test invocation of an if statement piped to another command."
(skip-unless (executable-find "rev"))
- (let ((eshell-test-value t))
- (eshell-command-result-equal "if $eshell-test-value {echo yes} | rev"
- "sey"))
- (let ((eshell-test-value nil))
- (eshell-command-result-equal "if $eshell-test-value {echo yes} | rev"
- nil)))
+ (with-temp-eshell
+ (let ((eshell-test-value t))
+ (eshell-match-command-output "if $eshell-test-value {echo yes} | rev"
+ "\\`sey\n?"))
+ (let ((eshell-test-value nil))
+ (eshell-match-command-output "if $eshell-test-value {echo yes} | rev"
+ "\\`\n?"))))
(ert-deftest esh-cmd-test/if-else-statement-pipe ()
"Test invocation of an if/else statement piped to another command."
(skip-unless (executable-find "rev"))
- (let ((eshell-test-value t))
- (eshell-command-result-equal
- "if $eshell-test-value {echo yes} {echo no} | rev"
- "sey"))
- (let ((eshell-test-value nil))
- (eshell-command-result-equal
- "if $eshell-test-value {echo yes} {echo no} | rev"
- "on")))
+ (with-temp-eshell
+ (let ((eshell-test-value t))
+ (eshell-match-command-output
+ "if $eshell-test-value {echo yes} {echo no} | rev"
+ "\\`sey\n?"))
+ (let ((eshell-test-value nil))
+ (eshell-match-command-output
+ "if $eshell-test-value {echo yes} {echo no} | rev"
+ "\\`on\n?"))))
(ert-deftest esh-cmd-test/unless-statement ()
"Test invocation of an unless statement."
diff --git a/test/lisp/eshell/esh-io-tests.el b/test/lisp/eshell/esh-io-tests.el
index 0f09afa19e..52501f5bb7 100644
--- a/test/lisp/eshell/esh-io-tests.el
+++ b/test/lisp/eshell/esh-io-tests.el
@@ -320,8 +320,9 @@ stdout originally pointed (the terminal)."
(ert-deftest esh-io-test/pipeline/subcommands ()
"Chek that all commands in a subcommand are properly piped."
(skip-unless (executable-find "rev"))
- (eshell-command-result-equal "{echo foo; echo bar} | rev"
- "raboof"))
+ (with-temp-eshell
+ (eshell-match-command-output "{echo foo; echo bar} | rev"
+ "\\`raboof\n?")))
;; Virtual targets
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a77204c646: ; Fix Eshell tests on macOS,
Jim Porter <=