diff options
| author | David Shepherd <davidshepherd7@gmail.com> | 2017-03-16 12:20:28 +0000 |
|---|---|---|
| committer | David Shepherd <davidshepherd7@gmail.com> | 2017-03-16 12:22:33 +0000 |
| commit | 80ae26bd0aadec284e382303b7a83abd35ae8797 (patch) | |
| tree | e8e903a03e029e891fa5bc6014e4057a1ae8961c /test/terminal-here-test.el | |
| parent | Fix TODOs (diff) | |
| download | emacs-terminal-here-80ae26bd0aadec284e382303b7a83abd35ae8797.tar.gz | |
Add function to launch in project root
Diffstat (limited to '')
| -rw-r--r-- | test/terminal-here-test.el | 17 |
1 files changed, 17 insertions, 0 deletions
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))) |
