Common Lisp Package: CL-UNICODE-TEST

README:

FUNCTION

Public

RUN-ALL-TESTS (&KEY VERBOSE)

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

Private

PROPERTY-TESTS (&KEY (FILE-NAME (MAKE-PATHNAME NAME properties TYPE NIL VERSION NIL DEFAULTS *THIS-FILE*)) VERBOSE)

Loops through all the forms in the file FILE-NAME and executes each of them as a test for a property. The forms must be lists (C S B) where C is a code point (an integer), S is a string denoting the property, and B is boolean denoting whether the character has the property or not. Tests are performed using HAS-PROPERTY. Prints each test to *STANDARD-OUTPUT* if VERBOSE is true and shows a simple progress indicator otherwise. Returns a true value iff all tests succeeded.

SIMPLE-TESTS (&KEY (FILE-NAME (MAKE-PATHNAME NAME simple TYPE NIL VERSION NIL DEFAULTS *THIS-FILE*)) VERBOSE)

Loops through all the forms in the file FILE-NAME and executes each of them using EVAL. Reads all forms with the alternative character syntax enabled. 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. Returns a true value iff all tests succeeded.

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.