diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2017-08-27 11:13:36 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2017-08-27 11:13:36 +0100 |
| commit | e668bdf406be70bba8f6f99e8f5e77d23f601b84 (patch) | |
| tree | 12fef3a8fa8045e0901ba8a3a14946de1f47127b | |
| parent | 30f93e387a66e4f39455986728ecd60c176e2279 (diff) | |
Fix failing docstring tests
| -rw-r--r-- | helpful.el | 3 | ||||
| -rw-r--r-- | test/unit-test.el | 8 |
2 files changed, 6 insertions, 5 deletions
@@ -619,7 +619,8 @@ For example, \"(some-func FOO &optional BAR)\"." "Get the docstring for SYM." (let (docstring) (if callable-p - (-when-let (docstring (documentation sym)) + (progn + (setq docstring (documentation sym)) (-when-let (docstring-with-usage (help-split-fundoc docstring sym)) (setq docstring (cdr docstring-with-usage)) (when docstring diff --git a/test/unit-test.el b/test/unit-test.el index 5e453b2..5cdde74 100644 --- a/test/unit-test.el +++ b/test/unit-test.el @@ -21,14 +21,14 @@ "Basic docstring fetching." (should (equal - (helpful--docstring #'test-foo) + (helpful--docstring #'test-foo t) "Docstring here."))) (ert-deftest helpful--docstring-advice () "Get the docstring on advised functions." (should (equal - (helpful--docstring #'test-foo-advised) + (helpful--docstring #'test-foo-advised t) "Docstring here too."))) (defun test-foo-no-docstring () @@ -36,7 +36,7 @@ (ert-deftest helpful--no-docstring () "We should not crash on a function without a docstring." - (should (null (helpful--docstring #'test-foo-no-docstring)))) + (should (null (helpful--docstring #'test-foo-no-docstring t)))) (defun test-foo-usage-docstring () "\n\n(fn &rest ARGS)" @@ -44,7 +44,7 @@ (ert-deftest helpful--usage-docstring () "If a function docstring only has usage, do not return it." - (should (null (helpful--docstring #'test-foo-usage-docstring)))) + (should (null (helpful--docstring #'test-foo-usage-docstring t)))) (defun test-foo-no-properties () nil) |
