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'.
This commit is contained in:
Jim Porter 2022-06-09 09:50:20 -07:00 committed by Eli Zaretskii
parent ac1d45c5ea
commit 4c31fd1668

View file

@ -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 ()