From c2f6d193ffd6db6f102f8c823ae3d865e403ef19 Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Sun, 10 Apr 2005 23:42:16 +0000
Subject: [PATCH] Begin adding tests for DOCUMENTATION

---
 ansi-tests/documentation.lsp | 47 ++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 ansi-tests/documentation.lsp

diff --git a/ansi-tests/documentation.lsp b/ansi-tests/documentation.lsp
new file mode 100644
index 00000000..cefb1b1f
--- /dev/null
+++ b/ansi-tests/documentation.lsp
@@ -0,0 +1,47 @@
+;-*- Mode:     Lisp -*-
+;;;; Author:   Paul Dietz
+;;;; Created:  Tue Dec 14 07:30:01 2004
+;;;; Contains: Tests of DOCUMENTATION
+
+(in-package :cl-test)
+
+(deftest documentation.1
+  (let* ((sym (gensym)))
+    (eval `(defun ,sym () nil))
+    (documentation (symbol-function sym) t))
+  nil)
+
+(deftest documentation.2
+  (let* ((sym (gensym)))
+    (eval `(defun ,sym () nil))
+    (let ((fn (symbol-function sym))
+	  (doc "FOO"))
+      (multiple-value-prog1
+       (setf (documentation fn t) "FOO")
+       (assert (or (null (documentation fn t))
+		   (equal doc (documentation fn t)))))))
+  "FOO")
+
+(deftest documentation.3
+  (let* ((sym (gensym)))
+    (eval `(defun ,sym () nil))
+    (documentation (symbol-function sym) 'function))
+  nil)
+
+(deftest documentation.4
+  (let* ((sym (gensym)))
+    (eval `(defun ,sym () nil))
+    (let ((fn (symbol-function sym))
+	  (doc "FOO"))
+      (multiple-value-prog1
+       (setf (documentation fn 'function) "FOO")
+       (assert (or (null (documentation fn 'function))
+		   (equal doc (documentation fn 'function)))))))
+  "FOO")
+
+
+
+	
+
+
+
-- 
GitLab