;; AR7587-DOC.TEST ;; Filed as {ERIS}TEST>CMLDOC>AR7587-DOC.TEST ;; By Peter Reidy ;; Verify that (macroexpand '(setf (documentation...) does not use gensyms or gentemps. (do-test-group AR7587 :before (test-defun gentrim (charpart symbol) "Extract the integer part of a gensym or gentemp." (parse-integer (string-trim charpart (symbol-name symbol))) ) (do-test AR7587-test ;; See that the integer parts of generated symbols advance exactly once before and after execution of the SETF - i.e. that the SETF itself did not advance the counter. (let ((beforesym (gentrim "#:G" (gensym)))(beforetemp (gentrim "T" (gentemp)))) (macroexpand '(setf (documentation 'foo 'function) "Alexis is a bitch.")) (and (= (1+ beforesym (gentrim "#:G" (gensym)))) (= (1+ beforetemp (gentrim "T" (gentemp)))) ) ) ) )