emacs-diffs
[Top][All Lists]
Advanced

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

master 4c31fd1668: Don't use 'list' command in Eshell command forms


From: Eli Zaretskii
Subject: master 4c31fd1668: Don't use 'list' command in Eshell command forms
Date: Fri, 10 Jun 2022 11:57:10 -0400 (EDT)

branch: master
commit 4c31fd166851ebd27a28743c613a4b1833cf2a46
Author: Jim Porter <jporterbugs@gmail.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    Don't use 'list' command in Eshell command forms
    
    When executed like a command, 'list' looks for external programs named
    'list' first before falling back to the Lisp function of the same
    name.  This causes unexpected behavior, since the Lisp function is
    what we want in these tests.
    
    * test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-cmd-indices)
    (esh-var-test/quoted-interp-cmd-indices): Use 'listify' instead of
    'list'.
---
 test/lisp/eshell/esh-var-tests.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/lisp/eshell/esh-var-tests.el 
b/test/lisp/eshell/esh-var-tests.el
index bee495eb6e..3180fe7a5f 100644
--- a/test/lisp/eshell/esh-var-tests.el
+++ b/test/lisp/eshell/esh-var-tests.el
@@ -147,7 +147,7 @@
 
 (ert-deftest esh-var-test/interp-cmd-indices ()
   "Interpolate command result with index"
-  (should (equal (eshell-test-command-result "+ ${list 1 2}[1] 3") 5)))
+  (should (equal (eshell-test-command-result "+ ${listify 1 2}[1] 3") 5)))
 
 (ert-deftest esh-var-test/interp-cmd-external ()
   "Interpolate command result from external command"
@@ -328,7 +328,8 @@ inside double-quotes"
 
 (ert-deftest esh-var-test/quoted-interp-cmd-indices ()
   "Interpolate command result with index inside double-quotes"
-  (should (equal (eshell-test-command-result "concat \"${list 1 2}[1]\" cool")
+  (should (equal (eshell-test-command-result
+                  "concat \"${listify 1 2}[1]\" cool")
                  "2cool")))
 
 (ert-deftest esh-var-test/quoted-interp-temp-cmd ()



reply via email to

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