blob: e2c1dab88641b2ce539d8d7897abad05c340fcfe (
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
|
.\" start test
.de test
. nr t +1
. tmc test \\nt (\\$*):
..
.
.\" make assertion
.de assert
.ec `
.ie `$1 \{\
. tm1 " success
.\}
.ec
.el \{\
. if \\nF<\\nt .tm1 " failure:
.ec `
. ds *exp `$1
.ec
. tm1 "{ \\*[*exp]
. if !'\\*[*exp]'\\$1' . tm1 "} \\$1
. nr f +1
. nr F \\nt
.\}
..
.\" end tests
.de end
. ie \\nf=0 .tm ** \\nt test(s) finished successfully **
. el \{
. ab !! \\nf test(s) failed !!
. \}
..
.
|