Skip to content
Snippets Groups Projects
Commit 67df78f9 authored by pfdietz's avatar pfdietz
Browse files

Add documentation tests for DEFINE-MODIFY-MACRO

parent 4bbe2cad
No related branches found
No related tags found
No related merge requests found
...@@ -84,3 +84,24 @@ ...@@ -84,3 +84,24 @@
(def-macro-test define-modify-macro.error.1 (def-macro-test define-modify-macro.error.1
(define-modify-macro nonexistent-modify-macro () foo)) (define-modify-macro nonexistent-modify-macro () foo))
;;; Documentation tests
(deftest define-modify-macro.documentation.1
(let ((sym (gensym)))
(eval `(define-modify-macro ,sym (&optional (delta 1)) +))
(values
(documentation sym 'function)
(documentation (macro-function sym) 'function)
(documentation (macro-function sym) t)))
nil nil nil)
(deftest define-modify-macro.documentation.2
(let ((sym (gensym))
(doc "DMM-DOC"))
(eval `(define-modify-macro ,sym (&optional (delta 1)) + ,doc))
(values
(equalt doc (or (documentation sym 'function) doc))
(equalt doc (or (documentation (macro-function sym) 'function) doc))
(equalt doc (or (documentation (macro-function sym) t) doc))))
t t t)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment