aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2017-04-02 13:36:20 +0100
committerWilfred Hughes <me@wilfred.me.uk>2017-04-02 13:39:11 +0100
commit4631d00026dbad5a376462ddf76d90354b6f430c (patch)
tree0076e129db9e6163c76411577e251b68793a4fe3 /test
parenta360236394503a3794d8dd7ac528d8a58f5da3ef (diff)
Handle compiled functions, or functions with only usage specified.
Diffstat (limited to 'test')
-rw-r--r--test/unit-test.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit-test.el b/test/unit-test.el
index ca31de4..a63fc8d 100644
--- a/test/unit-test.el
+++ b/test/unit-test.el
@@ -37,3 +37,12 @@
(ert-deftest helpful--no-docstring ()
"We should not crash on a function without a docstring."
(should (null (helpful--docstring #'test-foo-no-docstring))))
+
+(defun test-foo-usage-docstring ()
+ "\n\n(fn &rest ARGS)"
+ nil)
+
+(ert-deftest helpful--usage-docstring ()
+ "If a function docstring only has usage, do not return it."
+ (should (null (helpful--docstring #'test-foo-usage-docstring))))
+