shithub: kwa

Download patch

ref: c4f1e9166e14cd17667438f6af69460ad1d35ecf
parent: 3996048a7ae210a0212743aa555dfb11a05574b1
author: qwx <qwx@sciops.net>
date: Sat Oct 11 08:06:28 EDT 2025

test: compare against onetrueawk

--- a/test/Compare.T1
+++ b/test/Compare.T1
@@ -1,6 +1,6 @@
 #!/bin/rc
 rfork e
-oldawk=awk
+oldawk=trueawk
 awk=kwa
 
 for(i in T.*)
--- a/test/Compare.p
+++ b/test/Compare.p
@@ -1,15 +1,15 @@
 #!/bin/rc
 rfork e
-oldawk=awk
+oldawk=trueawk
 awk=kwa
 
 for(i in p.*){
 	echo -n $i:
-	$oldawk -f $i test.countries test.countries >foo1 
-	$awk -f $i test.countries test.countries >foo2 
-	if(cmp -s foo1 foo2)
+	$oldawk -f $i test.countries test.countries >foo1.$i
+	$awk -f $i test.countries test.countries >foo2.$i
+	if(cmp -s foo1.$i foo2.$i)
 		echo
 	if not
 		echo BAD
-	diff -b foo1 foo2 | sed 's/^/	/;10q'
+	diff -b foo1.$i foo2.$i | sed 's/^/	/;10q'
 }
--- a/test/Compare.t
+++ b/test/Compare.t
@@ -1,15 +1,15 @@
 #!/bin/rc
 rfork e
-oldawk=awk
+oldawk=trueawk
 awk=kwa
 
 for(i in t.*){
 	echo -n $i:
-	$oldawk -f $i test.data >foo1 
-	$awk -f $i test.data >foo2 
-	if(cmp -s foo1 foo2)
+	$oldawk -f $i test.data >foo1.$i
+	$awk -f $i test.data >foo2.$i
+	if(cmp -s foo1.$i foo2.$i)
 		echo
 	if not
 		echo BAD
-	diff -b foo1 foo2 | sed 's/^/	/;10q'
+	diff -b foo1.$i foo2.$i | sed 's/^/	/;10q'
 }
--- a/test/Compare.tt
+++ b/test/Compare.tt
@@ -1,6 +1,6 @@
 #!/bin/rc
 rfork e
-oldawk=awk
+oldawk=trueawk
 awk=kwa
 
 # an arbitrary collection of input data
@@ -15,12 +15,12 @@
 
 for(i in tt.*){
 	echo -n $oldawk': '
-	time $oldawk -f $i $td >foo2 >[2]foo2t
-	cat foo2t
+	time $oldawk -f $i $td >foo2.$i >[2]foo2t.$i
+	cat foo2t.$i
 	echo -n $awk': '
-	time $awk -f $i $td >foo1 >[2]foo1t
-	cat foo1t
-	cmp foo1 foo2
+	time $awk -f $i $td >foo1.$i >[2]foo1t.$i
+	cat foo1t.$i
+	cmp foo1.$i foo2.$i
 	echo $i: >>footot
-	cat foo1t foo2t >>footot
+	cat foo1t.$i foo2t.$i >>footot
 }
--