X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/94f169d809d2e873c63539b6183b390d222cc3f3..471f9daa24ee9251730e234fe92ad65c1fa9dff3:/man/testrig.3 diff --git a/man/testrig.3 b/man/testrig.3 index db3a261..190e732 100644 --- a/man/testrig.3 +++ b/man/testrig.3 @@ -11,7 +11,7 @@ .in -5 .sp 1 .. -.TH testrig 3 "5 June 1999" mLib +.TH testrig 3 "5 June 1999" "Straylight/Edgeware" "mLib utilities library" .SH NAME testrig \- generic test rig .\" @test_run @@ -98,18 +98,18 @@ typedef struct test_chunk { .VE The members of this structure are as follows: .TP -.I "name" +.B "const char *name" The name of the chunk described by this chunk definition, or null if this is the termination marker. .TP -.I "test" +.B "int (*test)(dstr dv[])" The test function. It is passed an array of dynamic strings, one for each field, and must return nonzero if the test succeeded or zero if the test failed. On success, the function should not write anything to stdout or stderr; on failure, a report of the test arguments should be emitted to stderr. .TP -.I "f" +.B "test_type *f[TEST_FIELDMAX]" Definitions of the fields. This is an array of pointers to .I "field types" (see below), terminated by a null pointer. @@ -128,15 +128,15 @@ typedef struct test_type { } test_type; .VE The -.I cvt +.B cvt member is a function called to read an input string stored in -.I buf +.B buf and output internal-format data in the dynamic string .IR d . The testrig driver has already stripped of quotes and dealt with backslash escapes. The -.I dump +.B dump member is called to write the internal-format data in dynamic string .I d to the @@ -160,6 +160,29 @@ with the expression *(int *)d.buf .VE which isn't pretty but does the job. +.TP +.B "type_long" +As for +.B type_int +but reads and stores a +.B long +instead. +.TP +.B "type_ulong" +As for +.B type_long +but reads and stores an +.B "unsigned long" +instead. +.TP +.B "type_uint32" +As for +.B type_int +but reads and stores a +.B uint32 +(see +.BR bits (3)) +instead. .SH "SEE ALSO" .BR mLib (3). .SH "AUTHOR"