blob: 688cefe4c42644fbb812c363906fe9b9d4d79e87 [file] [log] [blame]
Dmitry V. Levine837b142015-02-04 02:09:52 +00001BEGIN {
Andreas Schwab95336102015-03-12 16:47:38 +01002 r[1] = "^p?select6?\\(2, \\[0 1\\], \\[0 1\\], \\[0 1\\], NULL(, 0)?\\) += 1 \\(\\)$"
3 r[2] = "^p?select6?\\(-1, NULL, 0x[0-9a-f]+, NULL, NULL(, 0)?\\) += -1 "
4 r[3] = "^p?select6?\\(1025, \\[0\\], \\[\\], NULL, \\{0, 100(000)?\\}(, 0)?\\) += 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}