From 4c31fd166851ebd27a28743c613a4b1833cf2a46 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Thu, 9 Jun 2022 09:50:20 -0700 Subject: [PATCH] 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 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 () -- 2.39.2