summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBjarte Johansen <bjarte.johansen@gmail.com>2013-10-08 15:43:51 +0200
committerBjarte Johansen <bjarte.johansen@gmail.com>2013-10-08 16:19:05 +0200
commitf3049ab9bb94dfea093ee19cc9390f45c8c92538 (patch)
tree153886d3bf98d5d6be854d933e73d5a188fa147c /test
parentdb998d566460915c8ab2ac7e3970f442c7f2dd00 (diff)
Set correct name on find-or-create-repl-buffer
If the current nrepl-buffer is killed and then brought back up with `nrepl-switch-to-repl-buffer` (C-c C-z), the new buffer has the name "*nrepl*", when it should be "*nrepl /project-name/"*. This patch fixes the problem by calling `nrepl-repl-buffer-name` instead of using the static "*nrepl*"-string.
Diffstat (limited to 'test')
-rw-r--r--test/nrepl-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/nrepl-tests.el b/test/nrepl-tests.el
index e84077d5..cf4fb642 100644
--- a/test/nrepl-tests.el
+++ b/test/nrepl-tests.el
@@ -470,6 +470,14 @@
(should
(equal (nrepl-repl-buffer-name) "*nrepl*"))))))
+(ert-deftest test-nrepl-clojure-buffer-name-w/project ()
+ (with-temp-buffer
+ (lexical-let ((b1 (current-buffer)))
+ (let ((nrepl-connection-list (list (buffer-name b1)))
+ (nrepl-project-dir "/a/test/directory/project"))
+ (should
+ (equal (nrepl-repl-buffer-name) "*nrepl project*"))))))
+
(ert-deftest test-nrepl--find-rest-args-position ()
(should (= (nrepl--find-rest-args-position [fmt & arg]) 1))
(should (equal (nrepl--find-rest-args-position [fmt arg]) nil)))