70 lines
1.8 KiB
Plaintext
70 lines
1.8 KiB
Plaintext
;; Function To Be Testapropos-list: apropos-list
|
|
;;
|
|
;; Source: Guy L Steele's CLTL Chapter 25:Miscellaneous Features
|
|
;; Section: 25.3 Debugging Tools
|
|
;; Page: 443
|
|
;;
|
|
;; Created By: John Park
|
|
;;
|
|
;; Creation Date: Sep 30, 1986
|
|
;;
|
|
;; Last Update: Jan 20, 1987
|
|
;;
|
|
;; Filapropos-list As: {ERIS}<LISPCORE>CML>TEST>25-3-apropos-list.test
|
|
;;
|
|
;;
|
|
;; Syntax: (apropos-list string &optional packages)
|
|
;;
|
|
;; Function Description: (apropos-list 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.)
|
|
;; Apropos-list performs the same search that apropos does, but prints nothing.
|
|
;;
|
|
;; Argument(s): string or symbol
|
|
;; package (optional)
|
|
;;
|
|
;; Returns: list of the symbols whose print names contain string as a substring.
|
|
;;
|
|
;; Constraints/Limitations: none
|
|
|
|
(do-test-group
|
|
("apropos-list-test-setup"
|
|
:before (progn
|
|
(setq testt-number1 1)
|
|
(setq testt-number2 2)
|
|
(setq testt-number3 3)
|
|
(setq testt-number4 4)
|
|
(setq a-testt-number1 nil)
|
|
(setq b-testt-number2 nil)
|
|
(setq c-testt-number3 nil)
|
|
(defun dummmy-function1-x nil 'x)
|
|
(defun dummmy-function1-y nil 'y)
|
|
(defun dummmy-function1-z nil 'z)
|
|
)
|
|
)
|
|
|
|
(do-test "apropos-list-test"
|
|
(and (eq (set-difference
|
|
(apropos-list "testt-")
|
|
'(testt-number1 testt-number2 testt-number3 testt-number4
|
|
a-testt-number1 b-testt-number2 c-testt-number3))
|
|
nil)
|
|
(eq (set-difference
|
|
(apropos-list "dummmy")
|
|
'(dummmy-function1-x dummmy-function1-y dummmy-function1-z))
|
|
nil)
|
|
(member 'lisp-implementation-type
|
|
(apropos-list "implementation"))
|
|
(member 'apropos (apropos-list "apro"))
|
|
(member 'ffloor (apropos-list "floor"))
|
|
)
|
|
)
|
|
)
|
|
|
|
|
|
STOP
|
|
|
|
|
|
|
|
|