aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjohn haque <j.eh@mchsi.com>2011-08-20 08:28:02 -0500
committerjohn haque <j.eh@mchsi.com>2011-10-12 07:33:05 -0500
commit1fea520248b42ca995c8797698c60301ea42ffe9 (patch)
tree1aa80c13392c25aa6bf3eb931fec9c83a0621e25 /test
parentf757e147f1ae8254669b3222bc24a39ee8ff9b8f (diff)
downloadegawk-1fea520248b42ca995c8797698c60301ea42ffe9.tar.gz
egawk-1fea520248b42ca995c8797698c60301ea42ffe9.tar.bz2
egawk-1fea520248b42ca995c8797698c60301ea42ffe9.zip
Speed/memory performance improvements.
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am1
-rw-r--r--test/Makefile.in3
-rw-r--r--test/Maketests2
-rw-r--r--test/delfunc.ok5
-rw-r--r--test/fnamedat.ok5
-rw-r--r--test/fnarray.ok2
-rw-r--r--test/fnarray2.ok4
-rw-r--r--test/fnarydel.ok10
-rw-r--r--test/fnasgnm.ok5
-rw-r--r--test/fnparydl.ok6
-rw-r--r--test/funsmnam.ok2
-rw-r--r--test/gsubasgn.ok8
-rw-r--r--test/match2.ok5
13 files changed, 31 insertions, 27 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 57d4d464..92e5d1b6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -217,6 +217,7 @@ EXTRA_DIST = \
fnarray.awk \
fnarray.ok \
fnarray2.awk \
+ fnarray2.in \
fnarray2.ok \
fnarydel.awk \
fnarydel.ok \
diff --git a/test/Makefile.in b/test/Makefile.in
index e5ff2005..886e22c0 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -402,6 +402,7 @@ EXTRA_DIST = \
fnarray.awk \
fnarray.ok \
fnarray2.awk \
+ fnarray2.in \
fnarray2.ok \
fnarydel.awk \
fnarydel.ok \
@@ -2026,7 +2027,7 @@ fnarray:
fnarray2:
@echo fnarray2
- @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
fnaryscl:
diff --git a/test/Maketests b/test/Maketests
index c76769f4..5c1a6b38 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -242,7 +242,7 @@ fnarray:
fnarray2:
@echo fnarray2
- @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
fnaryscl:
diff --git a/test/delfunc.ok b/test/delfunc.ok
index d12f0bc9..29a7450d 100644
--- a/test/delfunc.ok
+++ b/test/delfunc.ok
@@ -1,2 +1,3 @@
-gawk: delfunc.awk:4: fatal: attempt to use function `f' as an array
-EXIT CODE: 2
+gawk: delfunc.awk:4: error: function `f' called with space between name and `(',
+or used as a variable or an array
+EXIT CODE: 1
diff --git a/test/fnamedat.ok b/test/fnamedat.ok
index d32acff4..d7b71c41 100644
--- a/test/fnamedat.ok
+++ b/test/fnamedat.ok
@@ -1,2 +1,3 @@
-gawk: fnamedat.awk:1: (FILENAME=- FNR=1) fatal: can't use function name `foo' as variable or array
-EXIT CODE: 2
+gawk: fnamedat.awk:1: error: function `foo' called with space between name and `(',
+or used as a variable or an array
+EXIT CODE: 1
diff --git a/test/fnarray.ok b/test/fnarray.ok
index 04260b0f..6cab9134 100644
--- a/test/fnarray.ok
+++ b/test/fnarray.ok
@@ -1,5 +1,3 @@
-gawk: fnarray.awk:5: Num = foo[c]
-gawk: fnarray.awk:5: ^ use of non-array as array
gawk: fnarray.awk:5: error: function `foo' called with space between name and `(',
or used as a variable or an array
EXIT CODE: 1
diff --git a/test/fnarray2.ok b/test/fnarray2.ok
index 243e4cc3..82815055 100644
--- a/test/fnarray2.ok
+++ b/test/fnarray2.ok
@@ -1,3 +1,3 @@
-gawk: fnarray2.awk:3: r = ++pile[c]
-gawk: fnarray2.awk:3: ^ use of non-array as array
+gawk: fnarray2.awk:3: error: function `pile' called with space between name and `(',
+or used as a variable or an array
EXIT CODE: 1
diff --git a/test/fnarydel.ok b/test/fnarydel.ok
index 7f3e4531..7078c015 100644
--- a/test/fnarydel.ok
+++ b/test/fnarydel.ok
@@ -1,24 +1,24 @@
first loop
+1
+2
+3
4
5
6
7
8
9
+second loop
+third loop
1
2
3
-second loop
-third loop
4
5
6
7
8
9
-1
-2
-3
call func
fourth loop
You should just see: 4 4
diff --git a/test/fnasgnm.ok b/test/fnasgnm.ok
index 0db5c6d8..5cacff27 100644
--- a/test/fnasgnm.ok
+++ b/test/fnasgnm.ok
@@ -1,2 +1,3 @@
-gawk: fnasgnm.awk:14: (FILENAME=- FNR=1) fatal: can't use function name `ShowMe' as variable or array
-EXIT CODE: 2
+gawk: fnasgnm.awk:14: error: function `ShowMe' called with space between name and `(',
+or used as a variable or an array
+EXIT CODE: 1
diff --git a/test/fnparydl.ok b/test/fnparydl.ok
index 26a5c390..9f798224 100644
--- a/test/fnparydl.ok
+++ b/test/fnparydl.ok
@@ -1,10 +1,10 @@
BEFORE LOOP
+DELETING KEY 1
+DELETING KEY 2
+DELETING KEY 3
DELETING KEY 4
DELETING KEY 5
DELETING KEY 6
DELETING KEY 7
-DELETING KEY 1
-DELETING KEY 2
-DELETING KEY 3
AFTER LOOP
0 elements still in q[]
diff --git a/test/funsmnam.ok b/test/funsmnam.ok
index e4f2174a..cce0d275 100644
--- a/test/funsmnam.ok
+++ b/test/funsmnam.ok
@@ -1,2 +1,2 @@
-gawk: funsmnam.awk:1: error: function `foo': can't use function name as parameter name
+gawk: funsmnam.awk:2: error: function `foo': can't use function name as parameter name
EXIT CODE: 1
diff --git a/test/gsubasgn.ok b/test/gsubasgn.ok
index 8817c36d..8a309c7c 100644
--- a/test/gsubasgn.ok
+++ b/test/gsubasgn.ok
@@ -1,5 +1,5 @@
-gawk: gsubasgn.awk:4: function test1 (r) { gsub(r, "x", test1) }
-gawk: gsubasgn.awk:4: ^ gsub third parameter is not a changeable object
-gawk: gsubasgn.awk:8: function test2 () { gsub(/a/, "x", test2) }
-gawk: gsubasgn.awk:8: ^ gsub third parameter is not a changeable object
+gawk: gsubasgn.awk:4: error: function `test1' called with space between name and `(',
+or used as a variable or an array
+gawk: gsubasgn.awk:8: error: function `test2' called with space between name and `(',
+or used as a variable or an array
EXIT CODE: 1
diff --git a/test/match2.ok b/test/match2.ok
index a4a91e85..ad2e324c 100644
--- a/test/match2.ok
+++ b/test/match2.ok
@@ -1,2 +1,3 @@
-gawk: match2.awk:3: fatal: match: third argument is not an array
-EXIT CODE: 2
+gawk: match2.awk:3: error: function `f' called with space between name and `(',
+or used as a variable or an array
+EXIT CODE: 1