mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 14:19:18 +02:00
By convention, a library meant for testing exports "run-tests". Also by convention, assume the test for (foo bar) is (foo bar-test), keeping the test in the same directory and avoiding confusion since (chibi test) is not a test for (chibi). - Avoids the hack of "load"ing test, with resulting namespace complications. - Allows keeping tests together with the libraries. - Allows setting up test hooks before running. - Allows implicit inference of test locations when using above conventions.
13 lines
437 B
Scheme
13 lines
437 B
Scheme
(define-library (chibi crypto md5-test)
|
|
(export run-tests)
|
|
(import (chibi) (chibi crypto md5) (chibi test))
|
|
(begin
|
|
(define (run-tests)
|
|
(test-begin "md5")
|
|
(test "d41d8cd98f00b204e9800998ecf8427e"
|
|
(md5 ""))
|
|
(test "900150983cd24fb0d6963f7d28e17f72"
|
|
(md5 "abc"))
|
|
(test "9e107d9d372bb6826bd81d3542a419d6"
|
|
(md5 "The quick brown fox jumps over the lazy dog"))
|
|
(test-end))))
|