emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6de88b6b02: Fix a recently-added Eshell test on MS-Windows


From: Eli Zaretskii
Subject: master 6de88b6b02: Fix a recently-added Eshell test on MS-Windows
Date: Sat, 13 Aug 2022 03:00:00 -0400 (EDT)

branch: master
commit 6de88b6b0261a549637270c0474998ac76eb65a9
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix a recently-added Eshell test on MS-Windows
    
    * test/lisp/eshell/esh-var-tests.el
    (esh-var-test/last-result-var-ext-cmd): Fix the test on
    MS-Windows by making sure the internal 'format' command
    is invoked.  (Bug#57129)
---
 test/lisp/eshell/esh-var-tests.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/test/lisp/eshell/esh-var-tests.el 
b/test/lisp/eshell/esh-var-tests.el
index 66dabd424b..0c094ee5a7 100644
--- a/test/lisp/eshell/esh-var-tests.el
+++ b/test/lisp/eshell/esh-var-tests.el
@@ -561,10 +561,13 @@ This tests when `eshell-lisp-form-nil-is-failure' is nil."
   "Test using the \"last result\" ($$) variable with an external command"
   (skip-unless (executable-find "["))
   (with-temp-eshell
-   (eshell-command-result-p "[ foo = foo ]; format \"%s\" $$"
-                            "t\n")
-   (eshell-command-result-p "[ foo = bar ]; format \"%s\" $$"
-                            "nil\n")))
+   ;; MS-DOS/MS-Windows have an external command 'format', which we
+   ;; don't want here.
+   (let ((eshell-prefer-lisp-functions t))
+     (eshell-command-result-p "[ foo = foo ]; format \"%s\" $$"
+                              "t\n")
+     (eshell-command-result-p "[ foo = bar ]; format \"%s\" $$"
+                              "nil\n"))))
 
 (ert-deftest esh-var-test/last-result-var-split-indices ()
   "Test using the \"last result\" ($$) variable with split indices"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]