aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Drozd <nicholasdrozd@gmail.com>2018-07-23 10:44:23 -0500
committerNick Drozd <nicholasdrozd@gmail.com>2018-07-23 10:44:23 -0500
commit1dda8077ba93ccada164bdc5e9269d6bc1245673 (patch)
tree7cfab0abd983db828bac449c909668a47f524853 /test
parent8651ec0e29275f6d749d23724297b413834b3178 (diff)
Add callees button smoke tests
Currently helpful--show-callees chokes on anonymous functions (I don't understand the finer points of button operation, so I couldn't figure out a more elegant way to write these tests.)
Diffstat (limited to 'test')
-rw-r--r--test/unit-test.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit-test.el b/test/unit-test.el
index 55da4e2..0fbcd3b 100644
--- a/test/unit-test.el
+++ b/test/unit-test.el
@@ -708,3 +708,22 @@ find the source code."
(apply #'bar 2)))))
(should (memq 'foo result))
(should (memq 'bar result))))
+
+(ert-deftest helpful--callees-button--smoke ()
+ (with-temp-buffer
+ (let ((button (helpful--make-callees-button
+ 'whatever
+ '(defun whatever () (something) (test 5)))))
+ (insert button)
+ (goto-char (point-min))
+ (push-button))))
+
+(ert-deftest helpful--callees-button--smoke-fail ()
+ :expected-result :failed
+ (with-temp-buffer
+ (let ((button (helpful--make-callees-button
+ '(lambda () (interactive) (other-window -1))
+ '(lambda () (interactive) (other-window -1)))))
+ (insert button)
+ (goto-char (point-min))
+ (push-button))))