Skip to content

Commit 799cc4f

Browse files
dottedmagbbatsov
authored andcommitted
Add a test that killing a REPL buffer removes it from the list
1 parent 238113f commit 799cc4f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

test/cider-connection-tests.el

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,23 @@
271271
(with-temp-buffer
272272
(setq major-mode 'clojurescript-mode)
273273
(expect (cider-repls) :to-equal (list bb2 bb1))
274-
(expect (cider-repls "cljs") :to-equal (list bb2))))))))))))))
274+
(expect (cider-repls "cljs") :to-equal (list bb2)))))))))))))
275+
276+
(describe "killed buffers"
277+
(it "do not show up in it"
278+
(let ((default-directory "/tmp/some-dir"))
279+
(cider-test-with-buffers
280+
(a b)
281+
(let ((session (list "some-session" a b)))
282+
(with-current-buffer a
283+
(setq cider-repl-type "clj"))
284+
(with-current-buffer b
285+
(setq cider-repl-type "clj"))
286+
(sesman-register 'CIDER session)
287+
(expect (cider-repls) :to-equal (list a b))
288+
(kill-buffer b)
289+
(expect (cider-repls) :to-equal (list a))
290+
(sesman-unregister 'CIDER session)))))))
275291

276292
(describe "cider--connection-info"
277293
(spy-on 'cider--java-version :and-return-value "1.7")

0 commit comments

Comments
 (0)