Charles.Forsyth20060303-partialeea662d19 years agoHistory
46 lines · 1023 B · Text
RawDownload
.TH SH-TEST 1.SH NAMEreport \- shell module for test reporting..SH SYNOPSIS.B load test .br.B report.I severity verbosity message[...].br.SH DESCRIPTION.B Itsis a loadable module for.IR sh (1)that provides a simple error reporting facility for tests which can be runby .IR itest (1) .It provides one command,.BR report ,which is used by a test to report a message with specified severity and verbosity..I Severitymust be one of INF, WRN, ERR or FTL for Information, warnings, errors and fatal errorsrespectively..I Verbosityis an integer between 0 and 9.For informatory messages (severity INF), the message will only bedisplayed if the currentverbosity level is greater than or equal to.I verbosity..SH EXAMPLE.EX#!/dis/sh load std test echo 1 > /tmp/aecho 2 >/tmp/breport INF 5 testing cmp commandif {cmp /tmp/a /tmp/b} {	report ERR 0 'cmp failed - reported different files as the same'}{	report INF 6 'cmp ok - reported different files as different'}.EE.SH SEE ALSO.IR itest (1)