3 # check - check the regression output for problems
5 # Copyright (C) 1999-2006 Landon Curt Noll
7 # Calc is open software; you can redistribute it and/or modify it under
8 # the terms of the version 2.1 of the GNU Lesser General Public License
9 # as published by the Free Software Foundation.
11 # Calc is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
14 # Public License for more details.
16 # A copy of version 2.1 of the GNU Lesser General Public License is
17 # distributed with calc under the filename COPYING-LGPL. You should have
18 # received a copy with calc; if not, write to Free Software Foundation, Inc.
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # @(#) $Revision: 30.2 $
22 # @(#) $Id: check.awk,v 30.2 2013/08/11 01:08:32 chongo Exp $
23 # @(#) $Source: /usr/local/src/cmd/calc/RCS/check.awk,v $
25 # Under source code control: 1996/05/25 22:07:58
26 # File existed as early as: 1996
28 # chongo <was here> /\oo/\ http://www.isthe.com/chongo/
29 # Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
31 # This awk script will print 3 lines before and after any non-blank line that
32 # does not begin with a number. This allows the 'make debug' rule to remove
33 # all non-interest lines the 'make check' regression output while providing
34 # 3 lines of context around unexpected output.
63 /: Ending regression tests$
/ {
67 $
1 ~
/^
[0-9]+:/ || $
1 ~
/^
[0-9]+-[0-9]*:/ || $
1 ~
/^
"\)\)$/ {
98 if (error > 0 && havebuf2) {
102 if (error > 0 && havebuf1) {
106 if (error > 0 && havebuf0) {
109 if (error > 0 || !end_seen) {