On Sat, Jun 03 2023 12:35, Jim Porter wrote: > You can probably simplify the multiline wrapper in your test to > something like this: > > (defmacro em-prompt-test--with-multiline (&rest body) > "Execute BODY with a multiline Eshell prompt." > `(let ((eshell-prompt-function (lambda () "multiline prompt\n$ "))) > ,@body)) > > Then use it like so: > > ;; Note: no arguments necessary. > (defun em-prompt-test/forward-backward-matching-input-with () > ;; ... > ) > > (ert-deftest em-prompt-test/forward-backward-matching-input-multiline () > (em-prompt-test--with-multiline > (em-prompt-test/forward-backward-matching-input-with))) > > That should be safer than setq'ing the prompt function. (You also don't > need to set the prompt regexp, since that's only useful if you want to > navigate via '(forward|backward)-paragraph', and we don't test that here.) oh, this is pretty neat, thanks! Sorry for the slow response; I have attached the (hopefully properly) corrected patch now.