aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2017-12-10 20:05:41 +0000
committerWilfred Hughes <me@wilfred.me.uk>2017-12-10 20:05:41 +0000
commit910675601f39075ea1069bb136fcd13e0cd2fbe2 (patch)
treec7e7c3ed40f89e3aa1f59ae31a432e54eca10e2f /test
parent2c8044f377378fade7dbc613a605f608bca3c97f (diff)
Ensure that we handle interactively defined functions
Also add a test
Diffstat (limited to 'test')
-rw-r--r--test/unit-test.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit-test.el b/test/unit-test.el
index 88602d3..cf50f35 100644
--- a/test/unit-test.el
+++ b/test/unit-test.el
@@ -40,6 +40,11 @@
"We should not crash on a function without a docstring."
(should (null (helpful--docstring #'test-foo-no-docstring t))))
+(ert-deftest helpful--interacively-defined-fn ()
+ "We should not crash on a function without source code."
+ (eval '(defun test-foo-defined-interactively () 42))
+ (helpful-function #'test-foo-defined-interactively))
+
(defun test-foo-usage-docstring ()
"\n\n(fn &rest ARGS)"
nil)