Skip to content

Commit b2554a9

Browse files
committed
Add regression script for bugs-fixed directory.
1 parent ee5b49b commit b2554a9

File tree

7 files changed

+40
-3
lines changed

7 files changed

+40
-3
lines changed

FIXES

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ THIS SOFTWARE.
2525
This file lists all bug fixes, changes, etc., made since the AWK book
2626
was sent to the printers in August, 1987.
2727

28+
July 2, 2020:
29+
Merge PRs 85 and 86 which fix regressions. Thanks to
30+
Tim van der Molen for the fixes.
31+
2832
June 25, 2020:
2933
Merge PRs 82 and 84. The latter fixes issue #83. Thanks to
3034
Todd Miller and awkfan77.

REGRESS

+4
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ then
3333
fi
3434

3535
REGRESS
36+
37+
cd ..
38+
cd bugs-fixed
39+
REGRESS

bugs-fixed/REGRESS

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! /bin/bash
2+
3+
if [ ! -f ../a.out ]
4+
then
5+
echo Making executable
6+
(cd .. ; make) || exit 0
7+
fi
8+
9+
for i in *.awk
10+
do
11+
echo === $i
12+
OUT=${i%.awk}.OUT
13+
OK=${i%.awk}.ok
14+
IN=${i%.awk}.in
15+
input=
16+
if [ -f $IN ]
17+
then
18+
input=$IN
19+
fi
20+
21+
../a.out -f $i $input > $OUT 2>&1
22+
if cmp -s $OK $OUT
23+
then
24+
rm -f $OUT
25+
else
26+
echo ++++ $i failed!
27+
fi
28+
done

bugs-fixed/fs-overflow.ok

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo

bugs-fixed/missing-precision.ok

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
./a.out: not enough args in printf(%*s)
1+
../a.out: not enough args in printf(%*s)
22
source line number 1

bugs-fixed/negative-nf.ok

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
./a.out: cannot set NF to a negative value
1+
../a.out: cannot set NF to a negative value
22
source line number 1

main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
2222
THIS SOFTWARE.
2323
****************************************************************/
2424

25-
const char *version = "version 20200625";
25+
const char *version = "version 20200702";
2626

2727
#define DEBUG
2828
#include <stdio.h>

0 commit comments

Comments
 (0)