diff options
| author | Po Lu | 2024-07-12 12:15:50 +0800 |
|---|---|---|
| committer | Po Lu | 2024-07-12 12:15:50 +0800 |
| commit | 38fa3e9350134fb69655e1e9b8e6d95a2dbcf3db (patch) | |
| tree | aa591c4a1b14c45d6f4a68f9646b4668c0b91199 /test/lisp/eshell | |
| parent | dc8cde2b6f3e7c55a85439c771284df2b4fa0e37 (diff) | |
| parent | a5ef9e25680d490e2a453e5ed518aba8f4560b2d (diff) | |
| download | emacs-38fa3e9350134fb69655e1e9b8e6d95a2dbcf3db.tar.gz emacs-38fa3e9350134fb69655e1e9b8e6d95a2dbcf3db.zip | |
Merge from savannah/emacs-30
a5ef9e25680 Document means of executing Emacs from unrelated Android ...
0de0056fd6b Don't emit a prompt in Eshell when a background command i...
ec1e300a215 Fix reference from buffer-stale-function docstring
Diffstat (limited to 'test/lisp/eshell')
| -rw-r--r-- | test/lisp/eshell/esh-cmd-tests.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/lisp/eshell/esh-cmd-tests.el b/test/lisp/eshell/esh-cmd-tests.el index 70e1901c169..d8124a19af6 100644 --- a/test/lisp/eshell/esh-cmd-tests.el +++ b/test/lisp/eshell/esh-cmd-tests.el | |||
| @@ -113,7 +113,7 @@ bug#59469." | |||
| 113 | (with-temp-eshell | 113 | (with-temp-eshell |
| 114 | (eshell-match-command-output | 114 | (eshell-match-command-output |
| 115 | (format "*echo hi > #<%s> &" bufname) | 115 | (format "*echo hi > #<%s> &" bufname) |
| 116 | (rx "[echo" (? ".exe") "] " (+ digit) "\n")) | 116 | (rx bos "[echo" (? ".exe") "] " (+ digit) "\n")) |
| 117 | (eshell-wait-for-subprocess t)) | 117 | (eshell-wait-for-subprocess t)) |
| 118 | (should (equal (buffer-string) "hi\n")))) | 118 | (should (equal (buffer-string) "hi\n")))) |
| 119 | 119 | ||
| @@ -129,6 +129,18 @@ bug#59469." | |||
| 129 | (eshell-wait-for-subprocess t)) | 129 | (eshell-wait-for-subprocess t)) |
| 130 | (should (equal (buffer-string) "olleh\n")))) | 130 | (should (equal (buffer-string) "olleh\n")))) |
| 131 | 131 | ||
| 132 | (ert-deftest esh-cmd-test/background/kill () | ||
| 133 | "Make sure that a background command that gets killed doesn't emit a prompt." | ||
| 134 | (skip-unless (executable-find "sleep")) | ||
| 135 | (let ((background-message (rx bos "[sleep" (? ".exe") "] " (+ digit) "\n"))) | ||
| 136 | (with-temp-eshell | ||
| 137 | (eshell-match-command-output "*sleep 10 &" background-message) | ||
| 138 | (kill-process (caar eshell-process-list)) | ||
| 139 | (eshell-wait-for-subprocess t) | ||
| 140 | ;; Ensure we didn't emit another prompt after killing the | ||
| 141 | ;; background process. | ||
| 142 | (should (eshell-match-output background-message))))) | ||
| 143 | |||
| 132 | 144 | ||
| 133 | ;; Lisp forms | 145 | ;; Lisp forms |
| 134 | 146 | ||