1 (defpackage #:success1 (:use :cl)
3 "This defines a simple successful package.
5 This is should all get pulled in and the markdown.md should be equal
9 #:func-that-does-stuff #:noargs #:result-list #:has-no-examples
10 #:values-result #:has-optional #:has-keywords #:has-rest))
12 (in-package #:success1)
14 (define-condition test-condition nil nil
16 "Simple documentation.
18 For a simple condition."))
20 (defun func-that-does-stuff (path x)
21 "FUNC-THAT-DOES-STUFF PATH X => RESULT
23 RESULT: SUCCESS-RESULT | FAILURE-RESULT
24 SUCCESS-RESULT: (:success FILENAME)
25 FAILURE-RESULT: (:failure FILENAME MSG)
30 X: a random value related to PATH
31 FILENAME: the file this func was run on
32 MSG: a string containing the failure message
36 FUNC-THAT-DOES-STUFF runs all the things against a file and returns
37 as soon as the first func error is found.
39 This second section uses PATH and X as something we should talk about, but
40 doesn't use all the arguments (let's include PATH here for fun)
44 (func-that-does-stuff #P\"path/to/file.lisp\" t) => (:success \"path/to/file.lisp\")
45 (func-that-does-stuff #P\"path/to/error.lisp\" nil) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
49 "RESULT-LIST => RESULT
51 RESULT: FAILURE-RESULT*
52 FAILURE-RESULT: (:failure FILENAME MSG)
56 FILENAME: the file this func was run on
57 MSG: a string containing the failure message
61 RESULT-LIST runs all the things against a file and returns
62 as soon as the first func error is found."
68 RESULT: SUCCESS-RESULT | FAILURE-RESULT
69 SUCCESS-RESULT: (:success FILENAME)
70 FAILURE-RESULT: (:failure FILENAME MSG)
74 FILENAME: the file this func was run on
75 MSG: a string containing the failure message
79 NOARGS runs all the things against a file and returns
80 as soon as the first func error is found.
84 (func-that-does-stuff) => (:success \"path/to/file.lisp\")
85 (func-that-does-stuff) => (:failure \"path/to/error.lisp\" \"Error msg\" 20 0)"
88 (defun has-no-examples ()
89 "HAS-NO-EXAMPLES => RESULT
91 RESULT: SUCCESS-RESULT | FAILURE-RESULT
92 SUCCESS-RESULT: (:success FILENAME)
93 FAILURE-RESULT: (:failure FILENAME MSG)
97 FILENAME: the file this func was run on
98 MSG: a string containing the failure message
102 HAS-NO-EXAMPLES runs all the things against a file and returns
103 as soon as the first func error is found."
106 (defun values-result ()
107 "VALUES-RESULT => RESULT1, RESULT2, RESULT3
109 RESULT1: SUCCESS-RESULT | FAILURE-RESULT
110 SUCCESS-RESULT: (:success FILENAME)
111 FAILURE-RESULT: (:failure FILENAME MSG)
113 ARGUMENTS AND VALUES:
115 RESULT2: second result
116 RESULT3: third result
117 FILENAME: the file this func was run on
118 MSG: a string containing the failure message
122 VALUES-RESULT runs all the things against a file and returns
123 as soon as the first func error is found."
126 (defun has-optional (path &optional x)
127 "HAS-OPTIONAL PATH &optional X => RESULT
129 RESULT: SUCCESS-RESULT | FAILURE-RESULT
130 SUCCESS-RESULT: (:success FILENAME)
131 FAILURE-RESULT: (:failure FILENAME MSG)
133 ARGUMENTS AND VALUES:
136 X: a random value related to PATH
137 FILENAME: the file this func was run on
138 MSG: a string containing the failure message
142 HAS-OPTIONAL runs all the things against a file and returns
143 as soon as the first func error is found.
145 This second section uses PATH and X as something we should talk about, but
146 doesn't use all the arguments (let's include PATH here for fun)"
149 (defun has-keywords (path &key x)
150 "HAS-KEYWORDS PATH &key X => RESULT
152 RESULT: SUCCESS-RESULT | FAILURE-RESULT
153 SUCCESS-RESULT: (:success FILENAME)
154 FAILURE-RESULT: (:failure FILENAME MSG)
156 ARGUMENTS AND VALUES:
159 X: a random value related to PATH
160 FILENAME: the file this func was run on
161 MSG: a string containing the failure message
165 HAS-KEYWORDS runs all the things against a file and returns
166 as soon as the first func error is found.
168 This second section uses PATH and X as something we should talk about, but
169 doesn't use all the arguments (let's include PATH here for fun)"
172 (defun has-rest (path &rest x)
173 "HAS-REST PATH &rest X => RESULT
175 RESULT: SUCCESS-RESULT | FAILURE-RESULT
176 SUCCESS-RESULT: (:success FILENAME)
177 FAILURE-RESULT: (:failure FILENAME MSG)
179 ARGUMENTS AND VALUES:
182 X: a random value related to PATH
183 FILENAME: the file this func was run on
184 MSG: a string containing the failure message
188 HAS-REST runs all the things against a file and returns
189 as soon as the first func error is found.
191 This second section uses PATH and X as something we should talk about, but
192 doesn't use all the arguments (let's include PATH here for fun)"