Skip to content

Commit

Permalink
Ensure that we don't leave any temporary buffers lying about
Browse files Browse the repository at this point in the history
Ensures that #33 stays fixed.
  • Loading branch information
Wilfred committed Oct 14, 2017
1 parent 85f4502 commit d45be10
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/unit-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,17 @@ variables defined without `defvar'."
(should
(equal (helpful--signature 'some-unused-function)
"(some-unused-function [Arg list not available until function definition is loaded.])")))

(ert-deftest helpful-function--single-buffer ()
"Ensure that calling `helpful-buffer' does not leave any extra
buffers lying around."
(let ((initial-buffers (buffer-list))
expected-buffers results-buffer)
(helpful-function #'enable-theme)
(setq results-buffer (get-buffer "*helpful: enable-theme*"))
(setq expected-buffers
(cons results-buffer
initial-buffers))
(should
(null
(-difference (buffer-list) expected-buffers)))))

0 comments on commit d45be10

Please sign in to comment.