aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-07-02 21:35:06 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-07-02 21:35:06 +0300
commitb2554a9e3d57042b9a6713888c1a65de25b3ed63 (patch)
tree4feae9be278663bf6058804c5b50da9a31907447
parentee5b49bb3307e70054299a00d6c3308996049ce2 (diff)
downloadone-true-awk-b2554a9e3d57042b9a6713888c1a65de25b3ed63.tar.gz
Add regression script for bugs-fixed directory.
-rw-r--r--FIXES4
-rwxr-xr-xREGRESS4
-rwxr-xr-xbugs-fixed/REGRESS28
-rw-r--r--bugs-fixed/fs-overflow.ok1
-rw-r--r--bugs-fixed/missing-precision.ok2
-rw-r--r--bugs-fixed/negative-nf.ok2
-rw-r--r--main.c2
7 files changed, 40 insertions, 3 deletions
diff --git a/FIXES b/FIXES
index 03bb867..9516a36 100644
--- a/FIXES
+++ b/FIXES
@@ -25,6 +25,10 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987.
+July 2, 2020:
+ Merge PRs 85 and 86 which fix regressions. Thanks to
+ Tim van der Molen for the fixes.
+
June 25, 2020:
Merge PRs 82 and 84. The latter fixes issue #83. Thanks to
Todd Miller and awkfan77.
diff --git a/REGRESS b/REGRESS
index 7d3ded6..eb3b5d7 100755
--- a/REGRESS
+++ b/REGRESS
@@ -33,3 +33,7 @@ then
fi
REGRESS
+
+cd ..
+cd bugs-fixed
+REGRESS
diff --git a/bugs-fixed/REGRESS b/bugs-fixed/REGRESS
new file mode 100755
index 0000000..0716003
--- /dev/null
+++ b/bugs-fixed/REGRESS
@@ -0,0 +1,28 @@
+#! /bin/bash
+
+if [ ! -f ../a.out ]
+then
+ echo Making executable
+ (cd .. ; make) || exit 0
+fi
+
+for i in *.awk
+do
+ echo === $i
+ OUT=${i%.awk}.OUT
+ OK=${i%.awk}.ok
+ IN=${i%.awk}.in
+ input=
+ if [ -f $IN ]
+ then
+ input=$IN
+ fi
+
+ ../a.out -f $i $input > $OUT 2>&1
+ if cmp -s $OK $OUT
+ then
+ rm -f $OUT
+ else
+ echo ++++ $i failed!
+ fi
+done
diff --git a/bugs-fixed/fs-overflow.ok b/bugs-fixed/fs-overflow.ok
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/bugs-fixed/fs-overflow.ok
@@ -0,0 +1 @@
+foo
diff --git a/bugs-fixed/missing-precision.ok b/bugs-fixed/missing-precision.ok
index 608b4fa..75e1e3d 100644
--- a/bugs-fixed/missing-precision.ok
+++ b/bugs-fixed/missing-precision.ok
@@ -1,2 +1,2 @@
-./a.out: not enough args in printf(%*s)
+../a.out: not enough args in printf(%*s)
source line number 1
diff --git a/bugs-fixed/negative-nf.ok b/bugs-fixed/negative-nf.ok
index 71c8604..de97f8b 100644
--- a/bugs-fixed/negative-nf.ok
+++ b/bugs-fixed/negative-nf.ok
@@ -1,2 +1,2 @@
-./a.out: cannot set NF to a negative value
+../a.out: cannot set NF to a negative value
source line number 1
diff --git a/main.c b/main.c
index 37572cc..535f1aa 100644
--- a/main.c
+++ b/main.c
@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
****************************************************************/
-const char *version = "version 20200625";
+const char *version = "version 20200702";
#define DEBUG
#include <stdio.h>