Commit 67df78f9 authored by pfdietz's avatar pfdietz
Browse files

Add documentation tests for DEFINE-MODIFY-MACRO

parent 4bbe2cad
......@@ -84,3 +84,24 @@
(def-macro-test define-modify-macro.error.1
(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)) +))
(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))
(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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment