aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: f4b4f569b3c18185d2db030206077c3d159ca59e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Myra test utils

Software freedom empowers sharing.  Let's dedicate our libre software projects
to saints known for fostering sharing!

This Guile scheme package is dedicated to St. Nicholas of Myra, bishop from 4th
century.  According to a legend, young Nicholas inherited some meaningful wealth
after his parents and then used it to make a secret gift of 3 money sacks that
he dropped at a home of 3 poor girls — saving them from being forced into
prostitution.  He's been the prototype of Santa Claus.

## What is this package for?

One part of the package — a test driver extracted from GNU Guix — allows SRFI-64
tests to be easily executed through Automake's `make check`.  This is the same
driver as also distributed with Automake, albeit with some extra improvements.

The other part — `(myra-test-utils)` module — exports modified variants of
SRFI-64's `test-*` forms that optionally spawn an interactive Guile REPL when an
unexpected condition is raised.

The `test-error` macro additionally also alters the behavior of its original by
verifying the type of the error raised by tested code.  The programmer-supplied
`error-type` argument of the original `test-error` form would be — as of GNU
Guile 3.0.9 — ignored (this is permitted by SRFI-64).  Here it can be either an
SRFI-35 condition type, a procedure or `#t` (for the original behavior of
accepting all error types).

The same module also supplies some convenience forms for using fixtures when
executing test groups.

## Using

Look at [de Paul records](https://git.koszko.org/de-paul-records/about) for an
example.

## Building & installation

This software has a Guix package definition in Wojtek's [personal
channel](https://git.koszko.org/guix/about).  That can serve you as a point of
reference.

## Copying

This package is available under GNU GPL v3.0 or (at your option) any later
version.  Additionally, much of the source is independently available under CC0
v1.0.  The repository is kept compliant with the
[REUSE](https://reuse.software/) specification, version 3.0.