.\" -*-nroff-*-
-.de VS
-.sp 1
-.in +5
-.nf
-.ft B
-..
-.de VE
-.ft R
-.fi
-.in -5
-.sp 1
-..
-.TH testrig 3 "5 June 1999" "Straylight/Edgeware" "mLib utilities library"
+.\"
+.\" Manual for old-fashioned testing
+.\"
+.\" (c) 1999, 2001, 2005, 2008, 2009, 2023, 2024 Straylight/Edgeware
+.\"
+.
+.\"----- Licensing notice ---------------------------------------------------
+.\"
+.\" This file is part of the mLib utilities library.
+.\"
+.\" mLib is free software: you can redistribute it and/or modify it under
+.\" the terms of the GNU Library General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or (at
+.\" your option) any later version.
+.\"
+.\" mLib is distributed in the hope that it will be useful, but WITHOUT
+.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+.\" License for more details.
+.\"
+.\" You should have received a copy of the GNU Library General Public
+.\" License along with mLib. If not, write to the Free Software
+.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+.\" USA.
+.
+.\"--------------------------------------------------------------------------
+.so ../defs.man \" @@@PRE@@@
+.
+.\"--------------------------------------------------------------------------
+.TH testrig 3mLib "5 June 1999" "Straylight/Edgeware" "mLib utilities library"
+.\" @test_do
+.\" @test_run
+.
+.\"--------------------------------------------------------------------------
.SH NAME
testrig \- generic test rig
-.\" @test_run
+.
+.\"--------------------------------------------------------------------------
.SH SYNOPSIS
+.
.nf
.B "#include <mLib/testrig.h>"
.PP
.BI "void test_run(int " argc ", char *" argv [],
.BI " const test_chunk " chunk "[], const char *" def );
.fi
+.
+.\"--------------------------------------------------------------------------
.SH DESCRIPTION
+.
.SS Structure
Test vectors are gathered together into
.I chunks
which should be processed in the same way. Chunks, in turn, are grouped
into
.IR suites .
+.
.SS Functions
The
.B test_do
argument is (the address of) an array of
.I "chunk definitions"
describing the layout of the test vector file.
+.
.SS "Test vector file syntax"
Test vector files are mostly free-form. Comments begin with a hash
.RB (` # ')
or a string enclosed in quote marks (double or single). Quoted strings
may contain newlines. In either type of value, a backslash escapes the
following character.
+.
.SS "Suite definitions"
A
.I suite definition
is a pointer to an array of these structures, terminated by one with a
null
.BR name .
+.
.SS "Chunk definitions"
A
.I "chunk definition"
reads test vectors one by one, translating each value according to the
designated field type, and then passing the completed array of fields to
the test function.
+.
.SS "Field types"
A field type describes how a field is to be read and written. A field
type is described by a
(see
.BR bits (3))
instead.
+.
+.\"--------------------------------------------------------------------------
.SH "SEE ALSO"
+.
+.BR tvec (3),
.BR mLib (3).
+.
+.\"--------------------------------------------------------------------------
.SH "AUTHOR"
+.
Mark Wooding, <mdw@distorted.org.uk>
+.
+.\"----- That's all, folks --------------------------------------------------