; Fix debug logging for synchronous commands in Eshell tests
* lisp/eshell/eshell.el (eshell-command-result): Call 'eshell-debug-command-start'. * test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell): Update comment. (eshell-test-command-result): Set 'eshell-debug-command'.
This commit is contained in:
parent
400e1015ef
commit
da8b323f82
2 changed files with 7 additions and 2 deletions
|
@ -357,6 +357,7 @@ corresponding to a successful execution."
|
|||
(with-temp-buffer
|
||||
(let ((eshell-non-interactive-p t))
|
||||
(eshell-mode)
|
||||
(eshell-debug-command-start command)
|
||||
(let ((result (eshell-do-eval
|
||||
(list 'eshell-commands
|
||||
(list 'eshell-command-to-value
|
||||
|
|
|
@ -58,7 +58,8 @@ beginning of the test file."
|
|||
;; to remove this eventually once we're confident that
|
||||
;; all the process bugs have been worked out. (At that
|
||||
;; point, we can just enable this selectively when
|
||||
;; needed.)
|
||||
;; needed.) See also `eshell-test-command-result'
|
||||
;; below.
|
||||
(eshell-debug-command (cons 'process eshell-debug-command))
|
||||
(eshell-history-file-name nil)
|
||||
(eshell-last-dir-ring-file-name nil)
|
||||
|
@ -159,7 +160,10 @@ inserting the command."
|
|||
(defun eshell-test-command-result (command)
|
||||
"Like `eshell-command-result', but not using HOME."
|
||||
(ert-with-temp-directory eshell-directory-name
|
||||
(let ((eshell-history-file-name nil))
|
||||
(let ((eshell-history-file-name nil)
|
||||
;; Enable process debug instrumentation. See
|
||||
;; `with-temp-eshell' above.
|
||||
(eshell-debug-command (cons 'process eshell-debug-command)))
|
||||
(eshell-command-result command))))
|
||||
|
||||
(defun eshell-command-result--equal (_command actual expected)
|
||||
|
|
Loading…
Add table
Reference in a new issue