test-utils

  1. test-utils
  2. Documentation
    1. (test-utils run)
      1. Usage
      2. run-tests-for
      3. run-test-for
      4. run-ident
      5. runid
      6. make-test-filename
      7. make-test-pathname
      8. test-lineup
      9. test-list-order<
      10. run-tests
      11. run-test
      12. test-files-rx
      13. csi-options
      14. csc-options
      15. run-test-evaluated
      16. run-test-compiled
    2. (test-utils gloss)
      1. Usage
      2. gloss
      3. glossf
      4. glossln
      5. glossn
      6. glossnf
      7. test-indent-width
      8. test-first-indentation
      9. test-max-indentation
      10. test-indentation-char
      11. test-group-level
      12. test-group-indent-width
      13. test-group-indent-string
    3. Examples
  3. Requirements
  4. Author
  5. Repository
  6. Version history
  7. License

Documentation

Gloss & Runner for CHICKEN Scheme test egg.

(test-utils run)

Usage

(import (test-utils run))

run-tests-for

[procedure] (run-tests-for EGGNAME [TEST-NAMES [CSC-OPTIONS [CSI-OPTIONS]]])

run-test-for

[procedure] (run-test-for EGGNAME [NAME [CSC-OPTIONS [CSI-OPTIONS]]])

run-ident

[procedure] (run-ident [IDENT]) -> (list-of (pair symbol *))
test-directory
string ; "."
test-extension
string ; "scm"
csi-options
(list-of string) ; ()
csi-excl-options
(list-of string) ; ()
csc-options
(list-of string) ; ()
csc-excl-options
(list-of string) ; ()
test-excl-names
(list-of string) ; ()
test-order
(string string -> boolean) ; string>?
EGG-NAME
string ; egg name

runid

[procedure] (runid ID [VALUE]) -> *

make-test-filename

[procedure] (make-test-filename NAME) -> string

make-test-pathname

[procedure] (make-test-pathname NAME) -> string

test-lineup

[procedure] (test-lineup [PATHS]) -> (list-of string)

test-list-order<

[procedure] (test-list-order< TEST-NAMES) -> (testname testname -> boolean)

Given an explicit ordering for the tests return a less-than procedure which enforces the order.

TEST-NAMES
(list-of testname)
testname
string

run-tests

[procedure] (run-tests [TEST-NAMES [CSC-OPTIONS [CSI-OPTIONS]]])

run-test

[procedure] (run-test [NAME [CSC-OPTIONS [CSI-OPTIONS]]])

test-files-rx

[procedure] (test-files-rx [REGEXP]) -> regexp

csi-options

[procedure] (csi-options [OPTIONS]) -> (list-of string)

csc-options

[procedure] (csc-options [OPTIONS]) -> (list-of string)

run-test-evaluated

[procedure] (run-test-evaluated NAME OPTIONS)

run-test-compiled

[procedure] (run-test-compiled NAME OPTIONS)

(test-utils gloss)

Usage

(import (test-utils gloss))

gloss

[procedure] (gloss [OBJS...])

test group gloss level display w/ newline.

glossf

[procedure] (glossf FMT [OBJS...])

test group gloss level format w/ newline.

glossln

[procedure] (glossln)

test group gloss level newline.

glossn

[procedure] (glossn [OBJS...])

test group gloss level display w/o newline.

glossnf

[procedure] (glossnf FMT [OBJS...])

test group gloss level format w/o newline.

test-indent-width

[procedure] (test-indent-width [WIDTH]) -> fixnum

test-first-indentation

[procedure] (test-first-indentation [INDENT]) -> fixnum

test-max-indentation

[procedure] (test-max-indentation [INDENT]) -> fixnum

test-indentation-char

[procedure] (test-indentation-char [CHAR]) -> char

test-group-level

[procedure] (test-group-level GROUP) -> fixnum

test-group-indent-width

[procedure] (test-group-indent-width GROUP) -> fixnum

test-group-indent-string

[procedure] (test-group-indent-string GROUP) -> string

Examples

; run.scm
(import (test-utils run))
(run-tests-for "this-eggname")

Requirements

test

Author

Kon Lovett

Repository

This egg is hosted on the CHICKEN Subversion repository:

https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/test-utils

If you want to check out the source code repository of this egg and you are not familiar with Subversion, see this page.

Version history

1.2.1
Validate run-ident argument.
1.2.0
Deprecate *...* runid names.
1.1.0
Fix signatures, Add test-list-order<.
1.0.0
Initial release.

License

Copyright (C) 2023-2024 Kon Lovett. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.