commit 691064ef0c35d343478891dc71366c058d9156a6
parent c4178fa7e1e4a5e098771e14c8731ff1b7a0d894
Author: Nick Drozd <nicholasdrozd@gmail.com>
Date: Sun, 22 Jul 2018 23:49:00 -0500
Add failing helpful--primitive-p test
The summary given by (helpful-callable 'rename-buffer) is
rename-buffer is an interactive function without a source file.
Needless to say, this is not correct. The problem stems from
helpful--primitive-p's inability to handle advised primitive
functions.
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/test/unit-test.el b/test/unit-test.el
@@ -118,6 +118,12 @@ symbol (not a form)."
;; Defined in elisp.
(should (not (helpful--primitive-p 'when t))))
+(ert-deftest helpful--primitive-p-fail ()
+ :expected-result :failed
+ ;; `rename-buffer' is primitive, but it's advised (by uniquify), and
+ ;; this confuses `helpful--primitive-p'.
+ (should (helpful--primitive-p 'rename-buffer t)))
+
(ert-deftest helpful-callable ()
;; We should not crash when looking at macros.
(helpful-callable 'when)