From 80ae26bd0aadec284e382303b7a83abd35ae8797 Mon Sep 17 00:00:00 2001 From: David Shepherd Date: Thu, 16 Mar 2017 12:20:28 +0000 Subject: Add function to launch in project root --- test/terminal-here-test.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/terminal-here-test.el b/test/terminal-here-test.el index 2eb9471..e30a238 100644 --- a/test/terminal-here-test.el +++ b/test/terminal-here-test.el @@ -21,6 +21,8 @@ (custom-reevaluate-setting 'terminal-here-terminal-command) (terminal-here-launch-in-directory "adir")))) + + (ert-deftest custom-terminal-command-as-list () (with-mock (mock (start-process "1" * "1" "2" "3")) @@ -38,3 +40,18 @@ (should-error (validate-setq terminal-here-terminal-command "astring") :type 'user-error))) + + + +(ert-deftest projectile-root () + (with-mock + (mock (projectile-project-root) => "project-root") + (mock (terminal-here-launch-in-directory "project-root")) + (terminal-here-project-launch))) + +(ert-deftest non-projectile-project-root () + (with-mock + (should (not (boundp 'projectile-project-root))) + (mock (vc-root-dir) => "vc-root") + (mock (terminal-here-launch-in-directory "vc-root")) + (terminal-here-project-launch))) -- cgit v1.3