aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/eshell
diff options
context:
space:
mode:
authorJim Porter2024-08-28 19:12:29 -0700
committerJim Porter2024-08-28 19:14:30 -0700
commitb6f4ffcc106fdbc21dfea45c75fdc4f217d8f201 (patch)
tree08693bf3b13a8dbe871183d053541b579ffa72a8 /test/lisp/eshell
parente269cf63a67d529740d0ec2382ae7c3a982cd064 (diff)
downloademacs-b6f4ffcc106fdbc21dfea45c75fdc4f217d8f201.tar.gz
emacs-b6f4ffcc106fdbc21dfea45c75fdc4f217d8f201.zip
Support "/dev/null" as a target when creating Eshell handles
Previously, you could only use this when setting the handle afterwards. * lisp/eshell/esh-io.el (eshell-set-output-handle): Don't catch 'eshell-null-device' here... (eshell-get-target): ... catch it here. * test/lisp/eshell/eshell-tests.el (eshell-test/eshell-command/output-dev-null): New test (bug#72857).
Diffstat (limited to 'test/lisp/eshell')
-rw-r--r--test/lisp/eshell/eshell-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index e5aeee5123e..50a748cd56e 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -150,6 +150,14 @@ This test uses a pipeline for the command."
150 (eshell-command "echo hi" 'eshell-command-output) 150 (eshell-command "echo hi" 'eshell-command-output)
151 (should (equal eshell-command-output "hi"))) 151 (should (equal eshell-command-output "hi")))
152 152
153(ert-deftest eshell-test/eshell-command/output-dev-null ()
154 "Test that the `eshell-command' function handles /dev/null properly."
155 (ert-with-temp-directory eshell-directory-name
156 (let ((eshell-history-file-name nil))
157 (with-temp-buffer
158 (eshell-command "echo hi" "/dev/null")
159 (should (equal (buffer-string) ""))))))
160
153(ert-deftest eshell-test/command-running-p () 161(ert-deftest eshell-test/command-running-p ()
154 "Modeline should show no command running" 162 "Modeline should show no command running"
155 (with-temp-eshell 163 (with-temp-eshell