Changeset 9495 in project


Ignore:
Timestamp:
03/11/08 23:25:31 (12 years ago)
Author:
Kon Lovett
Message:

Fixed args for missing param & style. Updated tbr & testbase.

Location:
wiki
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wiki/args

    r4617 r9495  
    11[[tags:eggs]]
    22
    3 This is version 1.2 of the '''args''' extension library for Chicken Scheme.
     3The '''args''' extension library for Chicken Scheme.
    44
    55[[toc:]]
     
    77== Description
    88
    9 
    109Command-line argument handling, on top of SRFI 37
    1110
     11
    1212== Documentation
    1313
    14 
    15 This extension provides a wrapper around SRFI 37 (args-fold).  The main goal is to let the user parse command-line arguments without having to write a lot of similar support code every time.
    16 
    17 By default, options and operands (non-options) are collected into two lists and returned by the parser, and unrecognized options complain and display help.  Therefore, it is very possible not to write any option-procs, operand-procs, or unrecognized-procs as required by SRFI 37.  However, the capability to customize is there should you need it.
    18 
    19 Additionally, the help text for your options can be generated for you, so your options and usage information don't get out of sync.
     14This extension provides a wrapper around SRFI 37 (args-fold). The main goal is
     15to let the user parse command-line arguments without having to write a lot of
     16similar support code every time.
     17
     18By default, options and operands (non-options) are collected into two lists and
     19returned by the parser, and unrecognized options complain and display help.
     20Therefore, it is very possible not to write any option-procs, operand-procs, or
     21unrecognized-procs as required by SRFI 37. However, the capability to
     22customize is there should you need it.
     23
     24Additionally, the help text for your options can be generated for you, so your
     25options and usage information don't get out of sync.
     26
    2027
    2128=== Creating options
    2229
    23 
    24  '''macro:''' (args:make-option (OPTION-NAME ...) ARG-DATA [BODY])
    25 
    26 Make an args:option record, suitable for passing to args:parse.
    27 
    28 OPTION-NAME ... is a sequence of short or long option names. They must be literal symbols; single-character symbols become short options, and longer symbols become long options. So {{(args:make-option (c cookie) ...)}} specifies a short option -c and long option --cookie.  Under the hood, (c cookie) becomes '(#\c "cookie"), as expected by SRFI 37's OPTION.
    29 
    30 ARG-DATA is either a pair (ARG-TYPE ARG-NAME) or a plain keyword ARG-TYPE.
    31 ARG-TYPE is a keyword that specifies whether the option takes an argument:
    32 
    33 <table class="symbol-table"><tr><td>#:required</td><td>Argument is required</td></tr>
     30==== args:make-option
     31
     32 <macro>(args:make-option (OPTION-NAME ...) ARG-DATA DOCSTRING [BODY])</macro>
     33
     34Make an {{args:option}} record, suitable for passing to {{args:parse}}.
     35
     36{{OPTION-NAME ...}} is a sequence of short or long option names. They must be
     37literal symbols; single-character symbols become short options, and longer
     38symbols become long options. So {{(args:make-option (c cookie) ...)}} specifies
     39a short option {{-c}} and long option {{--cookie}}. Under the hood, {{(c
     40cookie)}} becomes {{'(#\c "cookie")}}, as expected by SRFI 37's {{OPTION}}.
     41
     42{{ARG-DATA}} is either a pair {{(ARG-TYPE ARG-NAME)}} or a plain keyword
     43{{ARG-TYPE}}. {{ARG-TYPE}} is a keyword that specifies whether the option takes
     44an argument:
     45
     46<table class="symbol-table">
     47<tr><td>#:required</td><td>Argument is required</td></tr>
    3448<tr><td>#:optional</td><td>Argument is optional</td></tr>
    3549<tr><td>#:none</td><td>No argument (actually, any other value than #:required or #:optional is interpreted as #:none)</td></tr>
    3650</table>
    3751
    38 ARG-NAME, if provided, is a string specifying the name of the argument.
     52{{ARG-NAME}}, if provided, is a string specifying the name of the argument.
    3953This name is used in the help text produced by args:usage.
    4054
    41 BODY is an optional sequence of statements executed when this option is encountered.
    42 Behind the scenes, BODY is wrapped in code which adds the current option and its
    43 argument to the final options alist.  So, simply leave BODY blank and options
    44 will be collected for you.  BODY is an option-processor as defined in SRFI 37,
    45 and has access to the variables OPT (the current #<option>), NAME (the option name)
    46 and ARG (argument value or #f).
    47 
     55{{DOCSTRING}} is the help text.
     56
     57{{BODY}} is an optional sequence of statements executed when this option is
     58encountered. Behind the scenes, {{BODY}} is wrapped in code which adds the
     59current option and its argument to the final options alist. So, simply leave
     60{{BODY}} blank and options will be collected for you.
     61
     62{{BODY}} is an option-processor as defined in SRFI 37, and has access to the
     63variables {{OPT}} (the current #<option>), {{NAME}} (the option name) and
     64{{ARG}} (argument value or {{#f}}).
    4865
    4966
    5067=== Parsing the command line
    5168
    52 
    53  '''procedure:''' (args:parse ARGS OPTIONS-LIST [OPTIONALS])
    54 
    55 Parse ARGS, a list of command-line arguments given as strings,
    56 and return two values: an alist of option names (symbols) and their values,
    57 and a list of operands (non-option arguments).
    58 
    59 Operands are returned in order, but options
    60 are returned in reverse order.  Duplicate options are retained in
    61 the options alist, so this lets ASSQ find the ''last''
    62 occurrence of any duplicate option on the command line.  A (name
    63 . value) pair is added for each alias of every option found, so
    64 any alias is a valid lookup key.
    65 
    66 OPTIONS-LIST is a list of accepted options, each created by
     69==== args:parse
     70
     71 <procedure>(args:parse ARGS OPTIONS-LIST [OPTIONALS])</procedure>
     72
     73Parse {{ARGS}}, a list of command-line arguments given as strings, and return
     74two values: an alist of option names (symbols) and their values, and a list of
     75operands (non-option arguments).
     76
     77Operands are returned in order, but options are returned in reverse order.
     78Duplicate options are retained in the options alist, so this lets {{assq}} find
     79the ''last'' occurrence of any duplicate option on the command line. A (name .
     80value) pair is added for each alias of every option found, so any alias is a
     81valid lookup key.
     82
     83{{OPTIONS-LIST}} is a list of accepted options, each created by
    6784args:make-option.
    6885
    69 OPTIONALS is an optional sequence of keywords and values:
    70 
    71 <table class="symbol-table"><tr><td>#:operand-proc PROC</td><td>calls PROC for each operand, with arguments OPERAND OPTIONS OPERANDS</td></tr>
    72 <tr><td>#:unrecognized-proc PROC</td><td>calls PROC for each unrecognized option, with arguments OPTION NAME ARG OPTIONS OPERANDS</td></tr>
     86{{OPTIONALS}} is an optional sequence of keywords and values:
     87
     88<table class="symbol-table">
     89<tr><td>#:operand-proc {{PROC}}</td><td>calls {{PROC}} for each operand, with arguments {{OPERAND}} {{OPTIONS}} {{OPERANDS}}</td></tr>
     90<tr><td>#:unrecognized-proc {{PROC}}</td><td>calls {{PROC}} for each unrecognized option, with arguments {{OPTION}} {{NAME}} {{ARG}} {{OPTIONS}} {{OPERANDS}}</td></tr>
    7391</table>
    7492
    75 The default operand-proc is a no-op, and the default unrecognized-proc
    76 issues an error message and calls the help option's processor.
    77 See the args-fold documentation for usage information and an explanation
    78 of the procedure arguments; OPTIONS and OPERANDS are seed values.
    79 
    80 
    81 
    82  '''parameter:''' args:help-options
    83 
    84 List of option names (strings or single characters, as in SRFI 37)
    85 to be considered 'help' options, in order of preference.  args:parse
    86 uses this to select a help option from the option list it is passed.
    87 This is currently used only for unrecognized options, for which the
    88 help option is automatically invoked.
    89 
    90 By default, --help, -h and -? are considered help options.
    91 
     93The default operand-proc is a no-op, and the default unrecognized-proc issues
     94an error message and calls the help option's processor. See the args-fold
     95documentation for usage information and an explanation of the procedure
     96arguments; {{OPTIONS}} and {{OPERANDS}} are seed values.
     97
     98==== args:help-options
     99
     100 <parameter>(args:help-options [default: ("help" #\h #\?)])</parameter>
     101
     102List of option names (strings or single characters, as in SRFI 37) to be
     103considered 'help' options, in order of preference. {{args:parse}} uses this to
     104select a help option from the option list it is passed. This is currently used
     105only for unrecognized options, for which the help option is automatically
     106invoked.
    92107
    93108
    94109=== Usage information
    95110
    96 
    97 Well-behaved programs display help or usage text when invoked with an option such as --help.  args:usage will generate a formatted list of options in the GNU style, from a list of args:options.  Around this you might place a descriptive header and footer.
    98 
    99  '''procedure:''' (args:usage OPTION-LIST)
    100 
    101 Generate a formatted list of options from OPTION-LIST,
    102 and return a string suitable for embedding into help text.
    103 The single string consists of multiple lines, with a newline
    104 at the end of each line.  Thus, a typical use would be {{(print (args:usage opts)).}}
    105 
    106 
    107 
    108  '''parameter:''' args:width [default: 25]
    109 
    110 Width of the left (option) column.  We don't automatically format this column based on the length of the longest option, but you can set its width manually.
    111 
    112  '''parameter:''' args:separator [default: ", "]
     111Well-behaved programs display help or usage text when invoked with an option
     112such as --help. {{args:usage}} will generate a formatted list of options in the
     113GNU style, from a list of {{args:options}}. Around this you might place a
     114descriptive header and footer.
     115
     116==== args:usage
     117
     118 <procedure>(args:usage OPTION-LIST)</procedure>
     119
     120Generate a formatted list of options from {{OPTION-LIST}}, and return a string
     121suitable for embedding into help text. The single string consists of multiple
     122lines, with a newline at the end of each line. Thus, a typical use would be
     123{{(print (args:usage opts)).}}
     124
     125==== args:width
     126
     127 <parameter>(args:width [default: 25])</parameter>
     128
     129Width of the left (option) column. We don't automatically format this column
     130based on the length of the longest option, but you can set its width manually.
     131
     132==== args:separator
     133
     134 <parameter>(args:separator [default: ", "])</parameter>
    113135
    114136The string separator inserted between multiple options on the same line.
    115137
    116  '''parameter:''' args:indent [default: 1]
     138==== args:indent
     139
     140 <parameter>(args:indent [default: 1])</parameter>
    117141
    118142Number of spaces to indent the options from the left.
    119143
     144
    120145=== Operands and unrecognized options (advanced)
    121146
    122 
    123 These are suitable for use with #:operand-proc or #:unrecognized-proc in args:parse.  Most users will probably not customize these procedures themselves, but a couple useful prefabricated ones are provided.
    124 
    125  '''procedure:''' args:ignore-unrecognized-options
     147These are suitable for use with {{#:operand-proc}} or {{#:unrecognized-proc}}
     148in {{args:parse}}. Most users will probably not customize these procedures
     149themselves, but a couple useful prefabricated ones are provided.
     150
     151==== args:ignore-unrecognized-options
     152
     153 <procedure>(args:ignore-unrecognized-options)</procedure>
    126154
    127155Silently ignore unrecognized options, and omit from the options alist.
    128156
    129 
    130 
    131  '''procedure:''' args:accept-unrecognized-options
     157==== args:accept-unrecognized-options
     158
     159 <procedure>(args:accept-unrecognized-options)</procedure>
    132160
    133161Silently add unrecognized options to the options alist.
    134162
    135 
    136 
    137  '''macro:''' (args:make-operand-proc [BODY])
    138 
    139 Return a procedure suitable for using as an operand procedure
    140 in args:parse.  Provides the arguments OPERAND, OPTIONS, and OPERANDS
    141 to the BODY; where OPERAND is the current operand (as in args-fold)
    142 and OPTIONS and OPERANDS are SEEDS (as in args-fold) and should not be modified.
    143 Also wraps BODY in code that adds the operand to the final operand list (seed).
    144 
    145 
    146 
    147 == Bugs
    148 
    149 
    150 The name {{args:make-option}} is verbose.
     163==== args:make-operand-proc
     164
     165 <macro>(args:make-operand-proc [BODY])</macro>
     166
     167Return a procedure suitable for using as an operand procedure in {{args:parse}}.
     168
     169Provides the arguments {{OPERAND}}, {{OPTIONS}}, and {{OPERANDS}} to the
     170{{BODY}}; where {{OPERAND}} is the current operand (as in {{args-fold}}) and
     171{{OPTIONS}} and {{OPERANDS}} are {{SEEDS}} (as in {{args-fold}}) and should not be
     172modified. Also wraps {{BODY}} in code that adds the operand to the final
     173operand list (seed).
     174
    151175
    152176== Examples
     
    220244Additional examples can be found in [[args-examples.scm|args-examples.scm]].
    221245
     246
     247== Bugs
     248
     249
     250The name {{args:make-option}} is verbose.
     251
     252
    222253== About this egg
    223254
     
    226257
    227258[[http://3e8.org/zb|Zbigniew]]
     259
    228260=== Version history
    229261
     
    234266=== Requirements
    235267
    236 
    237268{{srfi-37 [args-fold]}}, {{srfi-13 [string-lib]}}, {{srfi-1 [list-lib]}}
     269
    238270
    239271=== License
  • wiki/testbase

    r9371 r9495  
    4444
    4545
     46==== Test File
     47
     48A {{test-file}} is a Scheme source file consisting of testbase forms and
     49necessary auxiliary definitions. The general template is:
     50
     51<enscript highlight=scheme>
     52(require-extension testbase)
     53.. other extensions, includes, imports, etc. as needed ..
     54
     55#| TestBase
     56.. see "testbase-driver" documentation ..
     57|#
     58
     59.. any expressions necessary to testing ..
     60
     61(define-test foo-test ... )
     62
     63(run-test "Foo Tests")
     64</enscript>
     65
     66While possible to use testbase forms without invoking {{run-test}} command line
     67processing is not performed.
     68
     69Command Line Options:
     70
     71; ---failure-exit CODE : Specifiy an exit code & set the early-exit-upon-failure-option. See {{test::exit-on-failure?}}, {{test::run}}, and {{run-test}}.
     72
     73; -b ---batch : Specify batch mode. See {{run-test}}.
     74
     75; -i ---interactive : Specify interactive (or driven) mode. See {{run-test}}.
     76
     77; -V ---version : Display the version.
     78
     79; -h ---help : Display help message.
     80
     81
    4682==== Macro and Procedure Naming Conventions
    4783
     
    64100a test file.
    65101
     102{{FLAG}} is a boolean, {{#t}} or {{#f}}.
     103
    66104===== test::timing
     105
     106<macro>(define-for-syntax test::timing FLAG)</macro>
     107
     108{{test::timing}} controls the expectation timing option. Default is {{#f}}.
     109
    67110===== test::filtering
    68 ===== test::catching
    69 ===== test::selecting
    70 ===== test::limiting
    71 
    72 <macro>(define-for-syntax test::timing FLAG)</macro>
    73111
    74112<macro>(define-for-syntax test::filtering FLAG)</macro>
    75 
    76 <macro>(define-for-syntax test::catching FLAG)</macro>
    77 
    78 <macro>(define-for-syntax test::selecting FLAG)</macro>
    79 
    80 <macro>(define-for-syntax test::limiting FLAG)</macro>
    81 
    82 {{FLAG}} is a boolean, {{#t}} or {{#f}}.
    83 
    84 {{test::timing}} controls the expectation timing option. Default is {{#f}}.
    85113
    86114{{test::filtering}} controls the test result filtering
    87115option. Default is {{#f}}.
    88116
     117===== test::catching
     118
     119<macro>(define-for-syntax test::catching FLAG)</macro>
     120
    89121{{test::catching}} controls the expectation error/exception
    90122trapping option. Default is {{#t}}.
    91 
    92 {{test::selecting}} controls the test selective evaluation option. Default is {{#f}}.
    93 
    94 {{test::limiting}} controls the test resource limit option. Default is {{#f}}.
    95123
    96124Dropping error/exception trapping is not suggested in the general
     
    98126not affect {{expect-exception}}.
    99127
     128===== test::selecting
     129
     130<macro>(define-for-syntax test::selecting FLAG)</macro>
     131
     132{{test::selecting}} controls the test selective evaluation option. Default is {{#f}}.
     133
     134===== test::limiting
     135
     136<macro>(define-for-syntax test::limiting FLAG)</macro>
     137
     138{{test::limiting}} controls the test resource limit option. Default is {{#f}}.
     139
    100140
    101141==== Multiline String Construction
    102142
    103143Due to a bug the Chicken multiline string forms cannot be used. This
    104 macro is provided as a workaround.
     144macro is provided as a workaround. For use in a test-file.
    105145
    106146===== MULTILINE-STRING
     
    391431When no tests are supplied all existing selections are removed and the test selection mode is set to the {{SELECTION-MODE}}.
    392432
    393 <example>
    394 <expr>(test::select! 'skip my-test-proc)
     433(test::select! 'skip my-test-proc)
    395434;; Now every test in 'my-test-proc' will be skipped.
    396435(test::select! 'take my-test-proc '(case "Top Case") "Foo")
    397436;; Now every test in 'my-test-proc' except the test-case "Top Case",
    398437;; and any test named "foo".
    399 </expr>
    400 </example>
    401438
    402439When a test container is selected all contained tests are similarly selected.
     
    444481will terminate with a termination result.
    445482
    446 '''Only operational on *nix platforms.'''
     483'''Only operational on *NIX platforms.'''
    447484
    448485===== test::procedures
     
    479516'''Really only for use during test development with a REPL.'''
    480517
     518===== test::exit-on-failure?
     519
     520<procedure>(test::exit-on-failure? [CODE-OR-FLAG])</procedure>
     521
     522When {{CODE-OR-FLAG}} is supplied sets the early-exit-upon-failure-option. Otherwise
     523returns the current setting.
     524
     525{{CODE-OR-FLAG}} is either {{#f}}, to reset the option, or an integer, to set the option.
     526
     527The initial setting is {{#f}}.
     528
    481529===== test::run
    482530
    483531<procedure>(test::run [MESSAGE [TEST-IDENTIFIER ...]])</procedure>
     532
     533{{MESSAGE}} is some identity for the set of the test-procedures.
     534When missing or {{#f}} the process command name is used.
    484535
    485536Displays a header with {{MESSAGE}}, and outputs the result of
     
    487538{{test::styler}} is not set a simple success/failure message is
    488539given.
    489 
    490 When interactive mode without a console there is no output by default. See
    491 {{test::add-echo!}}.
    492 
    493540The test-procedures are called in left to right order of the
    494541{{TEST-IDENTIFIER}} arguments. When a {{TEST-IDENTIFIER}} is not
     
    496543definition in the test-file.
    497544
    498 {{MESSAGE}} is some identity for the set of the test-procedures.
    499 When missing or {{#f}} the process command name is used.
    500 
    501545For parameterized test-procedures the corresponding test declarations
    502 to be run.
     546are run.
     547
     548When {{(test::exit-on-failure?)}} and some test fails then testbase will exit
     549with the exit-code.
     550
     551When interactive mode without a console there is no output by default. See
     552{{test::add-echo!}}.
     553
     554
    503555
    504556==== Run Tests
     
    510562<macro>(run-test [MESSAGE] [FORM ...])</macro>
    511563
    512 Usually the last expression in a test file.
     564Usually the last expression in a test file. Performs command-line processing.
    513565
    514566{{MESSAGE}} is some identity for the test. When missing the
    515567process command name is used. Use {{""}} for no message.
    516568
    517 {{FORM ...}} are instances of Scheme forms.
     569{{FORM ...}} are instances of Scheme forms. When missing {{(test::run
     570MESSAGE)}} is used.
    518571
    519572This macro will check the process command line for a {{batch}}
     
    532585reported as for {{test::add-echo!}}.
    533586
    534 '''Test macros are not automatically available in the REPL.'''
     587'''Test macros are not automatically available in the REPL. They must be
     588explicitly loaded.'''
    535589
    536590==== Test Macros
     
    12471301[[http://srfi.schemers.org/srfi-12/srfi-12.html|SRFI-12]].
    12481302
    1249 {{EXPRESSION}} should signal an exception matching
    1250 EXCEPTION-PATTERN.
     1303{{EXPRESSION}} should signal an exception matching {{EXCEPTION-PATTERN}}.
    12511304
    12521305  EXCEPTION-PATTERN : COND-EXN
     
    12771330An example:
    12781331
    1279 <example>
    1280 <init>(use testbase)</init>
    1281 <expr>
    1282 (test-case "exn1" d e (
    1283     [exn1 (make-composite-condition
    1284             (make-property-condition 'abc 'cbs "pbs")
    1285             (make-property-condition 'foo 'bar "zip"))])
    1286 
    1287   (expect-exception "1" (foo abc) (signal exn1))
    1288 
    1289     ;; These are the same test, the 2nd has an explicit predicate
    1290   (expect-exception "2" ((property foo (bar "zip"))
    1291                          (property abc (cbs "pbs"))) (signal exn1))
    1292   (expect-exception "3" ((property foo (equal? bar "zip"))
    1293                          (property abc (equal? cbs "pbs"))) (signal exn1))
    1294 )</expr>
    1295 </example>
     1332<enscript highlight=scheme>
     1333(define-test ...
     1334  ...
     1335  (test-case "exn1" d e (
     1336      [exn1 (make-composite-condition
     1337              (make-property-condition 'abc 'cbs "pbs")
     1338              (make-property-condition 'foo 'bar "zip"))])
     1339 
     1340    (expect-exception "1" (foo abc) (signal exn1))
     1341 
     1342      ;; These are the same test, the 2nd has an explicit predicate
     1343    (expect-exception "2" ((property foo (bar "zip"))
     1344                           (property abc (cbs "pbs"))) (signal exn1))
     1345    (expect-exception "3" ((property foo (equal? bar "zip"))
     1346                           (property abc (equal? cbs "pbs"))) (signal exn1))
     1347  )
     1348  ...
     1349)
     1350</enscript>
    12961351
    12971352===== expect-ec
     
    26202675be loaded explicitly, as in:
    26212676
    2622   (require-extension testbase-output-human)
    2623   (require-extension testbase-output-html)
    2624   (require-extension testbase-output-compact)
    2625   (require-extension testbase-output-minimal)
     2677<enscript highlight=scheme>
     2678(require-extension testbase-output-human)
     2679
     2680(require-extension testbase-output-html)
     2681
     2682(require-extension testbase-output-compact)
     2683
     2684(require-extension testbase-output-minimal)
     2685</enscript>
    26262686
    26272687This procedure is useful with a test report procedure. The actual
     
    26692729==== Examples
    26702730
    2671 Assume the following are the contents of the file
    2672 "testbase-example.scm":
    2673 
    2674 <example>
    2675 <expr>
     2731Assume the following are the contents of the file "testbase-example.scm":
     2732
     2733<enscript highlight=scheme>
    26762734(require-extension testbase testbase-output-human)
    26772735
     
    26902748(test::styler-set! example test::output-style-human)
    26912749(run-test "TestBase Example")
    2692 </expr>
    2693 </example>
     2750</enscript>
    26942751
    26952752Then the following entered from a command line interface:
     
    27922849A {{test-collect}} Example:
    27932850
    2794 <example>
    2795 <expr>
     2851<enscript highlight=scheme>
    27962852(require-extension testbase testbase-output-human)
    27972853
     
    28042860(test::styler-set! tcx test::output-style-human)
    28052861(run-test "TestBase Example")
    2806 </expr>
    2807 </example>
     2862</enscript>
    28082863
    28092864Produces the following output:
     
    29673022=== Changelog
    29683023
     3024* 1.5.2 Added early-exit-upon-failure-option
    29693025* 1.5.1 Fix for non-false expect predicate result
    29703026* 1.5 Added {{insist}} expectation form
  • wiki/testbase-results

    r9371 r9495  
    8080==== read-test-results-file
    8181
    82  [procedure] (read-test-results-file FILENAME)
    83 
    84 Reads the contents of the test results file {{FILENAME}} and returns a list. If
    85 necessary an absolute pathname will be constructed using the current
    86 parameters.
    87 
    88 ==== read-test-results-rows
    89 
    90  [procedure] (read-test-results-rows PORT)
    91 
    92 Reads the contents of the test results file from the open input {{PORT}} and
    93 returns a list.
     82 [procedure] (read-test-results-file FILENAME [FOLD-PROCEDURE])
     83
     84Reads the contents of the test results file {{FILENAME}} and returns the last
     85result of calling the {{FOLD-PROCEDURE}}. If necessary an absolute pathname
     86will be constructed using the current parameters.
     87
     88{{FOLD-PROCEDURE}} is a two argument procedure where the first argument is the
     89current row and the second argument is the result of the previous call. The
     90initial second argument is the empty list, {{'()}}. The default procedure is
     91{{cons}}.
    9492
    9593==== append-test-results-row
     
    104102recognized header entries are {{extension}} and {{setup}}.
    105103
     104
     105=== Test Results Open Port Procedures
     106
    106107==== fold-test-results-rows
    107108
     
    112113{{INITIAL-VALUE}} when the first call.
    113114
     115==== read-test-results-rows
     116
     117 [procedure] (read-test-results-rows PORT [FOLD-PROCEDURE])
     118
     119Reads the contents of the test results file from the open input {{PORT}} and
     120calls the {{FOLD-PROCEDURE}} on each row and the accumulated result.
     121
     122{{FOLD-PROCEDURE}} is a two argument procedure where the first argument is the
     123current row and the second argument is the result of the previous call. The
     124initial second argument is the empty list, {{'()}}. The default procedure is
     125{{cons}}.
     126
    114127
    115128== Test Results File Entry Procedures
     
    132145 [procedure] (test-results-row-model ROW)
    133146
    134 Returns the test results file entry {{ROW}} model field, a string.
     147Returns the test results file entry {{ROW}} {{model}} field, a string.
    135148
    136149==== test-results-row-when
     
    138151 [procedure] (test-results-row-when ROW)
    139152
    140 Returns the test results file entry {{ROW}} when field, a vector.
     153Returns the test results file entry {{ROW}} {{when}} field, a vector.
    141154
    142155==== test-results-row-results
     
    144157 [procedure] (test-results-row-results ROW)
    145158
    146 Returns the test results file entry {{ROW}} results field, a list.
     159Returns the test results file entry {{ROW}} {{results}} field, a list.
    147160
    148161
Note: See TracChangeset for help on using the changeset viewer.