Coverage report: /home/ellis/comp/core/lib/doc/dist.lisp

KindCoveredAll%
expression1043 23.3
branch12 50.0
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 ;;; doc/dist.lisp --- Lisp Distribution Documentation
2
 
3
 ;; Documentation utilities for Lisp 'Distributions'. Typically this
4
 ;; refers specifically to objects of type QL-DIST:DIST.
5
 
6
 ;;; Commentary:
7
 
8
 ;; public distros: Quicklisp, Ultralisp
9
 
10
 ;;; Code:
11
 (in-package :doc)
12
 
13
 (defclass dist-documentation ()
14
   ((dist :initarg :dist :type dist :accessor doc-dist)))
15
 
16
 (defmethod doc-systems ((self dist-documentation))
17
   (provided-systems (doc-dist self)))
18
 
19
 (defun dist-documentation (dist)
20
   "Return the DIST-DOCUMENTATION for a specified DIST."
21
   (let ((dist (if (typep dist 'dist)
22
                   dist
23
                   (find-dist (string-downcase dist)))))
24
     (make-instance 'dist-documentation :dist dist)))
25
 
26
 (defmethod print-object ((self dist-documentation) stream)
27
   (print-unreadable-object (self stream :type t)
28
     (format stream "~S :systems ~A" (doc-dist self) (length (doc-systems self)))))
29
 
30
 ;; maybe except an additional key for specific file types and maybe
31
 ;; include system def files..
32
 (defmethod doc-pathnames ((self dist-documentation)) 
33
   "Return a list of source pathnames from SELF. Includes files and directories."
34
   (remove-duplicates
35
    (apply #'append 
36
           (mapcar #'doc-files
37
                   (doc-systems self)))))
38
 
39
 (defmethod doc-directories ((self dist-documentation))
40
   "Return a list of source directories from SELF."
41
   (remove-if #'uiop:file-pathname-p (doc-pathnames self)))
42
 
43
 (defmethod doc-files ((self dist-documentation))
44
   "Return a list of source files from SELF."
45
   (remove-if #'uiop:directory-pathname-p (doc-pathnames self)))