diff options
| author | Jim Porter | 2022-01-21 10:32:00 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-01-21 10:32:00 +0100 |
| commit | 587edc46dfc0aa035c49a5c97ff36472e2c4dbfd (patch) | |
| tree | 6fbaf9ec3124706ea25aab0421bbe1c3393cfaa1 /test/lisp/eshell/eshell-tests.el | |
| parent | a6ad584ac27dcc6bbe2476face53a3165f99366d (diff) | |
| download | emacs-587edc46dfc0aa035c49a5c97ff36472e2c4dbfd.tar.gz emacs-587edc46dfc0aa035c49a5c97ff36472e2c4dbfd.zip | |
Further improve determination of when commands can be invoked directly
This covers the case when a subcommand is to be invoked in more places
than before, for example when a subcommand is concatenated in an
argument.
* lisp/eshell/esh-cmd.el (eshell--find-subcommands): New fuction.
(eshell--invoke-command-directly): Use 'eshell-find-subcommands'.
* test/lisp/eshell/eshell-tests.el
(eshell-test/interp-cmd-external-concat): New test (bug#30725).
Diffstat (limited to 'test/lisp/eshell/eshell-tests.el')
| -rw-r--r-- | test/lisp/eshell/eshell-tests.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el index c4cb9bf4850..1a7ab0ab06f 100644 --- a/test/lisp/eshell/eshell-tests.el +++ b/test/lisp/eshell/eshell-tests.el | |||
| @@ -167,6 +167,13 @@ e.g. \"{(+ 1 2)} 3\" => 3" | |||
| 167 | (eshell-command-result-p "echo ${*echo hi}" | 167 | (eshell-command-result-p "echo ${*echo hi}" |
| 168 | "hi\n"))) | 168 | "hi\n"))) |
| 169 | 169 | ||
| 170 | (ert-deftest eshell-test/interp-cmd-external-concat () | ||
| 171 | "Interpolate command result from external command with concatenation" | ||
| 172 | (skip-unless (executable-find "echo")) | ||
| 173 | (with-temp-eshell | ||
| 174 | (eshell-command-result-p "echo ${echo hi}-${*echo there}" | ||
| 175 | "hi-there\n"))) | ||
| 176 | |||
| 170 | (ert-deftest eshell-test/window-height () | 177 | (ert-deftest eshell-test/window-height () |
| 171 | "$LINES should equal (window-height)" | 178 | "$LINES should equal (window-height)" |
| 172 | (should (eshell-test-command-result "= $LINES (window-height)"))) | 179 | (should (eshell-test-command-result "= $LINES (window-height)"))) |