60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
;; Function To Be Testapropos: apropos
|
|
;;
|
|
;; Source: Guy L Steele's CLTL Chapter 25:Miscellaneous Features
|
|
;; Section: 25.3 Debugging Tools
|
|
;; Page: 442
|
|
;;
|
|
;; Creatapropos By: John Park
|
|
;;
|
|
;; Creation Date: Sep 30, 1986
|
|
;;
|
|
;; Last Update:
|
|
;;
|
|
;; Filapropos As: {ERIS}<LISPCORE>CML>TEST>25-3-apropos.test
|
|
;;
|
|
;;
|
|
;; Syntax: (apropos string &optional packages)
|
|
;;
|
|
;; Function Description: (apropos string) tries to find all available symbols whose
|
|
;; print names contain string as a substring. (A symbol may be supplied for the
|
|
;; string, in which case the print name of the symbol is used.) Whenever apropos
|
|
;; finds a symbol, it prints out the symbol's name; in addition, information about
|
|
;; the function definition and dynamic value of the symbol, if any, is printed.
|
|
;; If package is specified and not nil, then only symbols available in that
|
|
;; package are examined; otherwise "all" packages are searched, as if
|
|
;; by do-all-symbols
|
|
;;
|
|
;; Argument(s): string or symbol
|
|
;; package (optional)
|
|
;;
|
|
;; Returns: nil
|
|
;;
|
|
;; Constraints/Limitations: none
|
|
|
|
(do-test-group ("apropos-test-setup"
|
|
:before (progn
|
|
(setq testt-number1 1)
|
|
(setq testt-number2 2)
|
|
(setq testt-number3 3)
|
|
(setq testt-number4 4)
|
|
(setq dummy-testt-number1 nil)
|
|
(setq dummy-testt-number2 nil)
|
|
(setq dummy-testt-number3 nil)
|
|
(defun dummy-function1-x nil 'x)
|
|
(defun dummy-function1-y nil 'y)
|
|
(defun dummy-function1-z nil 'z)))
|
|
|
|
|
|
|
|
(do-test "apropos-test"
|
|
(and(eq (apropos "testt") nil)
|
|
(eq (apropos "dummy") nil)
|
|
(eq (apropos 'function1) nil)
|
|
(eq (apropos "apro") nil))))
|
|
|
|
STOP
|
|
|
|
|
|
|
|
|