helpful

a fork of Wilfred's helpful
git clone https://git.trogloxene.org/helpful.git
Log | Files | Refs | README

commit 1dda8077ba93ccada164bdc5e9269d6bc1245673
parent 8651ec0e29275f6d749d23724297b413834b3178
Author: Nick Drozd <nicholasdrozd@gmail.com>
Date:   Mon, 23 Jul 2018 10:44:23 -0500

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:
Mtest/unit-test.el | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git 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))))