summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSyohei YOSHIDA <syohex@gmail.com>2017-03-22 14:33:52 +0900
committerDavid Shepherd <davidshepherd7@gmail.com>2017-03-30 16:14:22 +0100
commit0eefb3a411eb6e18f3b92a4ad4476a35ca0f77c9 (patch)
treeb9d790f5d638c57e122965add6ebae0212702763 /test
parentUpdate README.md (diff)
downloademacs-terminal-here-0eefb3a411eb6e18f3b92a4ad4476a35ca0f77c9.tar.gz
Show error message if terminal command fails
Diffstat (limited to 'test')
-rw-r--r--test/terminal-here-test.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/terminal-here-test.el b/test/terminal-here-test.el
index bf84f10..8e8cab7 100644
--- a/test/terminal-here-test.el
+++ b/test/terminal-here-test.el
@@ -2,6 +2,7 @@
(ert-deftest linux-default-command ()
(with-mock
+ (mock (set-process-sentinel))
(mock (start-process "x-terminal-emulator" * "x-terminal-emulator"))
(let ((system-type 'gnu/linux))
(custom-reevaluate-setting 'terminal-here-terminal-command)
@@ -9,6 +10,7 @@
(ert-deftest osx-default-command ()
(with-mock
+ (mock (set-process-sentinel))
(mock (start-process "open" * "open" "-a" "Terminal.app" "adir"))
(let ((system-type 'darwin))
(custom-reevaluate-setting 'terminal-here-terminal-command)
@@ -16,6 +18,7 @@
(ert-deftest windows-default-command ()
(with-mock
+ (mock (set-process-sentinel))
(mock (start-process "cmd.exe" * "cmd.exe" "/C" "start" "cmd.exe"))
(let ((system-type 'windows-nt))
(custom-reevaluate-setting 'terminal-here-terminal-command)
@@ -25,12 +28,14 @@
(ert-deftest custom-terminal-command-as-list ()
(with-mock
+ (mock (set-process-sentinel))
(mock (start-process "1" * "1" "2" "3"))
(validate-setq terminal-here-terminal-command '("1" "2" "3"))
(terminal-here-launch-in-directory "adir")))
(ert-deftest custom-terminal-command-as-function ()
(with-mock
+ (mock (set-process-sentinel))
(mock (start-process "1" * "1" "2" "3" "adir"))
(validate-setq terminal-here-terminal-command (lambda (dir) (list "1" "2" "3" dir)))
(terminal-here-launch-in-directory "adir")))