From: Jim Porter Date: Thu, 9 Jun 2022 16:50:20 +0000 (-0700) Subject: Don't use 'list' command in Eshell command forms X-Git-Tag: emacs-29.0.90~1910^2~91 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c31fd166851ebd27a28743c613a4b1833cf2a46;p=emacs.git 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'. --- diff --git a/test/lisp/eshell/esh-var-tests.el b/test/lisp/eshell/esh-var-tests.el index bee495eb6e1..3180fe7a5fc 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 ()