changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/doc/tests.lisp

changeset 698: 96958d3eb5b0
parent: 0f0e5f9b5c55
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 ;;; doc/tests.lisp --- DOC tests
2 
3 ;;
4 
5 ;;; Code:
6 (defpackage :doc/tests
7  (:use :cl :rt :doc :std))
8 
9 (in-package :doc/tests)
10 
11 (defsuite :doc)
12 (in-suite :doc)
13 (in-readtable :std)
14 
15 (defvar *good-header* #";;; foo/bar.lisp --- a dummy lisp description
16 
17 ;; a dummy lisp summary
18 
19 ;;; Code:
20 "#)
21 
22 (defvar *bad-header* #";; not a valid header -- :'C
23 
24 ;;
25 'boop"#)
26 
27 (defvar *good-heading* #";;; Foobar:
28 "#)
29 
30 (defvar *bad-heading* #";;;Foobar:"#)
31 
32 (eval-always
33  (defmacro is-doc-typep (type arg)
34  `(is (typep ,arg ',type))))
35 
36 (deftest doc-symbol ()
37  (is-doc-typep symbol-documentation (symbol-documentation 'car)))
38 
39 
40 (deftest doc-package ()
41  (is-doc-typep package-documentation (package-documentation)))
42 
43 (deftest doc-system ()
44  (is-doc-typep system-documentation (system-documentation :std)))
45 
46 (deftest doc-file ()
47  (let ((file (or *compile-file-pathname* (asdf:system-relative-pathname :doc "tests.lisp"))))
48  (is-doc-typep file-documentation (file-documentation file))))
49 
50 (deftest doc-dist ()
51  (is-doc-typep dist-documentation (dist-documentation :quicklisp)))
52 
53 (deftest image-documentation ()
54  (is t))
55 
56 (deftest doc-db ()
57  (rocksdb:load-rocksdb))