Common Lisp Package: CL-INTERPOL-TEST

README:

FUNCTION

Public

RUN-ALL-TESTS (&KEY VERBOSE)

Runs all tests for CL-INTERPOL and returns a true value iff all tests succeeded. VERBOSE is interpreted by the individual test suites above.

Private

SIMPLE-TESTS (&KEY (FILE-NAME (MAKE-PATHNAME NAME simple TYPE NIL VERSION NIL DEFAULTS *THIS-FILE*)) (EXTERNAL-FORMAT '(LATIN-1 EOL-STYLE LF)) VERBOSE)

Loops through all the forms in the file FILE-NAME and executes each of them using EVAL. The CL-INTERPOL syntax is enabled when the forms are read. It is assumed that each FORM specifies a test which returns a true value iff it succeeds. Prints each test form to *STANDARD-OUTPUT* if VERBOSE is true and shows a simple progress indicator otherwise. EXTERNAL-FORMAT is the FLEXI-STREAMS external format which is used to read the file. Returns a true value iff all tests succeeded. (SETQ ...) forms are treated special in that they're just EVALuated but not counted as tests. The global special variables exported by CL-INTERPOL (and some from CL-UNICODE as well) are rebound during the tests so that they can be safely set in the test files.

MACRO

Private

DO-TESTS ((NAME &OPTIONAL SHOW-PROGRESS-P) &BODY BODY)

Helper macro which repeatedly executes BODY until the code in body calls the function DONE. It is assumed that each invocation of BODY will be the execution of one test which returns NIL in case of success and a list of strings describing errors otherwise. The macro prints a simple progress indicator (one dots for ten tests) to *STANDARD-OUTPUT* unless SHOW-PROGRESS-P is NIL and returns a true value iff all tests succeeded. Errors in BODY are caught and reported (and counted as failures).

VARIABLE

Private

*THIS-FILE*

The location of this source file. Needed to find the data files.