1 ;; Copyright (c) 2003 Nikodemus Siivola
3 ;; Permission is hereby granted, free of charge, to any person obtaining
4 ;; a copy of this software and associated documentation files (the
5 ;; "Software"), to deal in the Software without restriction, including
6 ;; without limitation the rights to use, copy, modify, merge, publish,
7 ;; distribute, sublicense, and/or sell copies of the Software, and to
8 ;; permit persons to whom the Software is furnished to do so, subject to
9 ;; the following conditions:
11 ;; The above copyright notice and this permission notice shall be
12 ;; included in all copies or substantial portions of the Software.
14 ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 ;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 ;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 ;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 ;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 ;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 (defpackage :hyperdoc-test
23 (:use
:cl
:rt
:hyperdoc
))
37 (defvar *hyperdoc-base-uri
* "http://www.example.com/foo/")
39 (defun hyperdoc-lookup (symbol type
)
40 (declare (ignore type
))
43 (ensure-class "ensure-class.html")))
45 ;;;; OTHER TEST PACKAGE
53 (defvar *hyperdoc-base-uri
* "file://bar/")
55 (defun hyperdoc-lookup (symbol doc-type
)
56 (when (member doc-type
'(variable function
))
57 (concatenate 'string
(string-downcase (symbol-name doc-type
))
58 "/" (string-downcase (symbol-name symbol
)))))
63 (in-package :hyperdoc-test
)
67 "http://www.lispworks.com/reference/HyperSpec/Body/a_cons.htm")
71 "http://www.example.com/foo/cons.html")
75 (setf (base-uri 'foo
) "http://newbase.com/")
77 (setf (base-uri 'foo
) "http://www.example.com/foo/"))
78 "http://newbase.com/cons.html")
86 "http://www.lispworks.com/reference/HyperSpec/Body/f_car_c.htm")
89 (lookup 'ensure-class
)
90 "http://www.alu.org/mop/dictionary.html#ensure-class")
93 (lookup 'foo
:ensure-class
)
94 "http://www.example.com/foo/ensure-class.html")
98 (("file://bar/variable/foo" .
"VARIABLE")
99 ("file://bar/function/foo" .
"FUNCTION")))