blob: 142504aeeacee9cbfa90c49fdd31d608fe5cbed9 [file] [log] [blame]
Dmitry V. Levine837b142015-02-04 02:09:52 +00001BEGIN {
Dmitry V. Levin599819d2015-02-27 01:39:26 +00002 r[1] = "^select\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL\\) += 1 \\(\\)$"
3 r[2] = "^select\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL\\) += -1 "
4 r[3] = "^select\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100\\}\\) += 0 \\(Timeout\\)$"
Dmitry V. Levine837b142015-02-04 02:09:52 +00005 r[4] = "^\\+\\+\\+ exited with 0 \\+\\+\\+$"
6 lines = 4
7 fail = 0
8}
9
10NR > lines { exit 1 }
11
12{
13 if (match($0, r[NR]))
14 next
15
16 print "Line " NR " does not match."
17 fail = 1
18}
19
20END {
21 if (fail == 0 && NR != lines) {
22 fail = 1
23 print "Expected " lines " lines, found " NR " line(s)."
24 }
25 exit fail
26}