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'.
(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"
(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 ()