summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt90
-rw-r--r--test/ChangeLog50
-rw-r--r--test/Makefile.am77
-rw-r--r--test/Makefile.in152
-rw-r--r--test/Maketests75
-rw-r--r--test/asortbool.awk19
-rw-r--r--test/asortbool.ok6
-rw-r--r--test/badargs.ok3
-rw-r--r--test/dumpvars.ok2
-rw-r--r--test/functab5.ok1
-rw-r--r--test/id.ok1
-rw-r--r--test/intest.awk4
-rw-r--r--test/nsidentifier.ok1
-rw-r--r--test/readall.ok7
-rw-r--r--test/readall1.awk10
-rw-r--r--test/readall2.awk15
-rw-r--r--test/rwarray.awk11
-rw-r--r--test/symtab11.ok1
-rw-r--r--test/symtab8.ok2
-rw-r--r--test/testext-mpfr.ok2
-rw-r--r--test/testext.ok2
21 files changed, 308 insertions, 223 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
deleted file mode 100644
index fee5eeca..00000000
--- a/test/CMakeLists.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-#
-# test/CMakeLists.txt --- CMake input file for gawk
-#
-# Copyright (C) 2013
-# the Free Software Foundation, Inc.
-#
-# This file is part of GAWK, the GNU implementation of the
-# AWK Programming Language.
-#
-# GAWK is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# GAWK is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-#
-
-## process this file with CMake to produce Makefile
-
-if(WIN32)
- set(SHELL_PREFIX "C:\\MinGW\\msys\\1.0\\bin\\sh")
-endif()
-
-# Find the names of the groups of tests in Makefile.am.
-file(READ ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am ALL_GROUPS)
-string(REGEX MATCHALL "[A-Z_]*_TESTS " ALL_GROUPS "${ALL_GROUPS}")
-string(REGEX REPLACE "_TESTS " ";" ALL_GROUPS "${ALL_GROUPS}")
-# For each group of test cases, search through Makefile.am and find the test cases.
-foreach(testgroup ${ALL_GROUPS} )
- file(READ ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.am ONE_GROUP)
- string(REGEX MATCH "${testgroup}_TESTS = [a-z0-9_ \\\n\t]*" ONE_GROUP "${ONE_GROUP}")
- string(REGEX REPLACE "${testgroup}_TESTS = " "" ONE_GROUP "${ONE_GROUP}")
- string(REGEX REPLACE "[\\\n\t]" "" ONE_GROUP "${ONE_GROUP}")
- string(REGEX REPLACE " " ";" ONE_GROUP "${ONE_GROUP}")
- # Use each name of a test case to start a script that executes the test case.
- foreach(testcase ${ONE_GROUP} )
- add_test("${testgroup}.${testcase}" ${SHELL_PREFIX} ${CMAKE_SOURCE_DIR}/cmake/basictest ${CMAKE_BINARY_DIR}/gawk${CMAKE_EXECUTABLE_SUFFIX} ${testcase})
- endforeach(testcase)
-endforeach(testgroup)
-
-# Create an empty configuration file for customizing test execution.
-set(CTestCustom ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
-file(WRITE ${CTestCustom} "# DO NOT EDIT, THIS FILE WILL BE OVERWRITTEN\n" )
-# Test case SHLIB.filefuncs needs a file named gawkapi.o in source directory.
-file(APPEND ${CTestCustom} "file(COPY ${CMAKE_SOURCE_DIR}/README DESTINATION ${CMAKE_SOURCE_DIR}/gawkapi.o)\n")
-# Exclude test cases from execution that make no sense on a certain platform.
-file(APPEND ${CTestCustom} "set(CTEST_CUSTOM_TESTS_IGNORE\n")
-if(WIN32)
- file(APPEND ${CTestCustom} " BASIC.exitval2\n")
- file(APPEND ${CTestCustom} " BASIC.hsprint\n")
- file(APPEND ${CTestCustom} " BASIC.rstest4\n")
- file(APPEND ${CTestCustom} " BASIC.rstest5\n")
- file(APPEND ${CTestCustom} " UNIX.getlnhd\n")
- file(APPEND ${CTestCustom} " UNIX.pid\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.beginfile1\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.beginfile2\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.clos1way\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.devfd\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.devfd1\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.devfd2\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.getlndir\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.posix\n")
- file(APPEND ${CTestCustom} " GAWK_EXT.pty1\n")
- file(APPEND ${CTestCustom} " INET.inetdayu\n")
- file(APPEND ${CTestCustom} " INET.inetdayt\n")
- file(APPEND ${CTestCustom} " INET.inetechu\n")
- file(APPEND ${CTestCustom} " INET.inetecht\n")
- file(APPEND ${CTestCustom} " MACHINE.double2\n")
- file(APPEND ${CTestCustom} " LOCALE_CHARSET.fmttest\n")
- file(APPEND ${CTestCustom} " LOCALE_CHARSET.lc_num1\n")
- file(APPEND ${CTestCustom} " LOCALE_CHARSET.mbfw1\n")
- file(APPEND ${CTestCustom} " SHLIB.filefuncs\n")
- file(APPEND ${CTestCustom} " SHLIB.fnmatch\n")
- file(APPEND ${CTestCustom} " SHLIB.fork\n")
- file(APPEND ${CTestCustom} " SHLIB.fork2\n")
- file(APPEND ${CTestCustom} " SHLIB.fts\n")
- file(APPEND ${CTestCustom} " SHLIB.functab4\n")
- file(APPEND ${CTestCustom} " SHLIB.readdir\n")
- file(APPEND ${CTestCustom} " SHLIB.revtwoway\n")
- file(APPEND ${CTestCustom} " SHLIB.rwarray\n")
-endif()
-file(APPEND ${CTestCustom} ")\n")
-
diff --git a/test/ChangeLog b/test/ChangeLog
index 16d04218..c57a0d50 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -28,11 +28,19 @@
* Makefile.am (EXTRA_DIST): indirectcall3, new test.
* indirectcall3.awk, indirectcall3.ok: New files.
+2022-02-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * badargs.ok: Updated after code change.
+
2022-02-10 Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (EXTRA_DIST): close_status, new test.
* close_status.awk, close_status.ok: New files.
+2022-02-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * nsidentifier.ok: Update after code changes.
+
2022-02-09 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): indirectbuiltin2, new test.
@@ -43,6 +51,23 @@
* Makefile.am (EXTRA_DIST): nsidentifier, new test.
* nsidentifier.awk, nsidentifier.ok: New files.
+2021-12-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (EXTRA_DIST): Add readall1.awk, readall2.awk, and
+ readall.ok.
+ (SHLIB_TESTS): Add readall.
+ (GENTESTS_UNUSED): Add readall1.awk and readall2.awk.
+ (readall): Add new test of the writeall and readall functions.
+ * readall1.awk, readall2.awk, readall.ok: New files.
+
+2021-12-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (testext): Change awk pattern to include functions in
+ testext.awk.
+ (diffout): If running MPFR tests and there's an mpfr.ok file, compare
+ to that instead of to the regular ok file.
+ * testext.ok, testext-mpfr.ok: Update for new test_array_create test.
+
2021-12-07 Andrew J. Schorr <aschorr@telemetry-investments.com>
* iolint.awk, iolint.ok: Reorder "cat" pipe/output file test to reduce
@@ -177,16 +202,41 @@
2021-05-05 Arnold D. Robbins <arnold@skeeve.com>
+ * CMakeLists.txt: Removed.
+
+2021-05-05 Arnold D. Robbins <arnold@skeeve.com>
+
* Makefile.am (iolint): Fix for out-of-tree builds.
(testext): Ditto
* iolint.ok: Updated.
+2021-05-02 Arnold D. Robbins <arnold@skeeve.com>
+
+ * asortbool.awk, functab5.ok, id.ok, rwarrray.awk,
+ symtab11.ok: Revise after code changes.
+
+2021-04-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * asortbool.ok: Revise after code changes.
+ * rwarray.awk: Ditto.
+
2021-04-14 Arnold D. Robbins <arnold@skeeve.com>
* noeffect.awk: Add more test cases. Thanks to Wolfgang Laun
<wolfgang.laun@gmail.com>.
* lintwarn.ok, noeffect.ok: Updated after code and test changes.
+2021-03-30 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRA_DIST): asortbool, new test.
+ * asortbool.awk, asortbool.ok: New files.
+ * rwarray.awk: Add test of saving/restoring bool values.
+
+2021-03-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * dumpvars.ok, functab5.ok, id.ok, intest.awk, symtab11.ok,
+ symtab8.ok: Updated after code changes.
+
2021-02-13 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): argcasfile, new test.
diff --git a/test/Makefile.am b/test/Makefile.am
index eade5437..c7937405 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -133,6 +133,8 @@ EXTRA_DIST = \
assignnumfield.ok \
assignnumfield2.awk \
assignnumfield2.ok \
+ asortbool.awk \
+ asortbool.ok \
awkpath.ok \
back89.awk \
back89.in \
@@ -1041,6 +1043,9 @@ EXTRA_DIST = \
range1.ok \
range2.awk \
range2.ok \
+ readall1.awk \
+ readall2.awk \
+ readall.ok \
readbuf.awk \
readbuf.ok \
readdir.awk \
@@ -1454,36 +1459,37 @@ UNIX_TESTS = \
GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
- arraysort2 arraytype backw badargs beginfile1 beginfile2 binmode1 \
- charasbytes colonwarn clos1way clos1way2 clos1way3 clos1way4 \
- clos1way5 clos1way6 commas crlf dbugeval dbugeval2 dbugeval3 \
- dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 dfacheck1 \
- dumpvars errno exit fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 \
- fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs funlen functab1 \
- functab2 functab3 functab6 fwtest fwtest2 fwtest3 fwtest4 fwtest5 \
- fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 getlndir \
- gnuops2 gnuops3 gnureops gsubind icasefs icasers id igncdym igncfs \
- ignrcas2 ignrcas4 ignrcase incdupe incdupe2 incdupe3 incdupe4 \
- incdupe5 incdupe6 incdupe7 include include2 indirectbuiltin \
- indirectbuiltin2 \
- indirectcall indirectcall2 indirectcall3 inf-nan-torture intarray iolint \
- isarrayunset lint lintexp lintindex lintint lintlength lintplus \
- lintold lintset lintwarn manyfiles match1 match2 match3 mbstr1 \
- mbstr2 mixed1 mktime modifiers muldimposix nastyparm negtime \
- next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
- nsawk1c nsawk2a nsawk2b nsbad nsbad_cmd nsforloop nsfuncrecurse \
- nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 octdec patsplit posix \
- printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
- profile0 profile1 profile2 profile3 profile4 profile5 profile6 \
- profile7 profile8 profile9 profile10 profile11 profile12 profile13 \
- profile14 profile15 profile16 pty1 pty2 rebuf regexsub regnul1 regnul2 \
+ arraysort2 arraytype asortbool backw badargs beginfile1 \
+ beginfile2 binmode1 charasbytes clos1way clos1way2 clos1way3 \
+ clos1way4 clos1way5 clos1way6 colonwarn commas crlf dbugeval \
+ dbugeval2 dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd \
+ devfd1 devfd2 dfacheck1 dumpvars errno exit fieldwdth forcenum \
+ fpat1 fpat2 fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull \
+ fsfwfs functab1 functab2 functab3 functab6 funlen fwtest fwtest2 \
+ fwtest3 fwtest4 fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub \
+ gensub2 gensub3 getlndir gnuops2 gnuops3 gnureops gsubind \
+ icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase \
+ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
+ include include2 indirectbuiltin indirectcall indirectcall2 \
+ indirectcall3 indirectbuiltin2 \
+ inf-nan-torture intarray iolint isarrayunset lint lintexp \
+ lintindex lintint lintlength lintold lintplus lintset lintwarn \
+ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \
+ modifiers muldimposix nastyparm negtime next nondec nondec2 \
+ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \
+ nsawk2b nsbad nsbad_cmd nsforloop nsfuncrecurse nsindirect1 \
+ nsidentifier nsindirect2 nsprof1 nsprof2 octdec patsplit posix printfbad1 \
+ printfbad2 printfbad3 printfbad4 printhuge procinfs profile0 \
+ profile1 profile10 profile11 profile12 profile13 profile14 \
+ profile15 profile16 profile2 profile3 profile4 profile5 profile6 \
+ profile7 profile8 profile9 pty1 pty2 rebuf regexsub reginttrad \
profile17 \
- regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
+ regnul1 regnul2 regx8bit reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 sandbox1 shadow shadowbuiltin sortfor \
sortfor2 sortu sourcesplit split_after_fpat splitarg4 strftfld \
strftime strtonum strtonum1 stupid1 stupid2 stupid3 stupid4 stupid5 \
- switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 symtab7 \
- symtab8 symtab9 symtab10 symtab11 timeout typedregex1 typedregex2 \
+ switch2 symtab1 symtab10 symtab11 symtab2 symtab3 symtab4 symtab5 \
+ symtab6 symtab7 symtab8 symtab9 timeout typedregex1 typedregex2 \
symtab12 \
typedregex3 typedregex4 typedregex5 typedregex6 typeof1 typeof2 \
typeof3 typeof4 typeof5 typeof6 watchpoint1
@@ -1508,6 +1514,7 @@ SHLIB_TESTS = \
getfile \
inplace1 inplace2 inplace2bcomp inplace3 inplace3bcomp \
ordchr ordchr2 \
+ readall \
readdir readdir_test readdir_retest readfile readfile2 revout \
revtwoway rwarray \
testext time
@@ -1615,7 +1622,8 @@ ZOS_FAIL = @ZOS_FAIL@
GENTESTS_UNUSED = Makefile.in checknegtime.awk dtdgport.awk fix-fmtspcl.awk \
fmtspcl-mpfr.ok fmtspcl.awk fmtspcl.tok gtlnbufv.awk hello.awk \
inchello.awk inclib.awk inplace.1.in inplace.2.in inplace.in \
- printfloat.awk readdir0.awk valgrind.awk xref.awk
+ printfloat.awk readdir0.awk valgrind.awk xref.awk \
+ readall1.awk readall2.awk
# List of tests on MinGW or DJGPP that need a different cmp program
NEED_TESTOUTCMP = \
@@ -2299,7 +2307,7 @@ inplace3bcomp::
testext::
@echo $@
- @-$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk
+ @-$(AWK) ' /^(@load|BEGIN|function)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk
@-$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
@@ -2335,6 +2343,13 @@ readdir_retest:
@-$(AWK) -lreaddir_test -F/ -f "$(srcdir)"/$@.awk "$(top_srcdir)" > _$@
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
+readall:
+ @echo $@
+ @-$(AWK) -lrwarray -f "$(srcdir)"/$@1.awk -v "ofile=readall.state" > _$@
+ @-$(AWK) -lrwarray -f "$(srcdir)"/$@2.awk -v "ifile=readall.state" >> _$@
+ @-$(CMP) $@.ok _$@ && rm -f _$@
+ @-$(RM) -f readall.state
+
fts:
@echo $@
@-case `uname` in \
@@ -2543,7 +2558,11 @@ diffout:
if [ "$$i" != "_*" ]; then \
echo ============== $$i ============= ; \
base=`echo $$i | sed 's/^_//'` ; \
- if [ -r $${base}.ok ]; then \
+ if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null && [ -r $${base}-mpfr.ok ]; then \
+ diff -u $${base}-mpfr.ok $$i ; \
+ elif echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null && [ -r "$(srcdir)"/$${base}-mpfr.ok ]; then \
+ diff -u "$(srcdir)"/$${base}-mpfr.ok $$i ; \
+ elif [ -r $${base}.ok ]; then \
diff -u $${base}.ok $$i ; \
else \
diff -u "$(srcdir)"/$${base}.ok $$i ; \
diff --git a/test/Makefile.in b/test/Makefile.in
index cb6c2b2c..f1c1423b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -399,6 +399,8 @@ EXTRA_DIST = \
assignnumfield.ok \
assignnumfield2.awk \
assignnumfield2.ok \
+ asortbool.awk \
+ asortbool.ok \
awkpath.ok \
back89.awk \
back89.in \
@@ -1307,6 +1309,9 @@ EXTRA_DIST = \
range1.ok \
range2.awk \
range2.ok \
+ readall1.awk \
+ readall2.awk \
+ readall.ok \
readbuf.awk \
readbuf.ok \
readdir.awk \
@@ -1720,36 +1725,37 @@ UNIX_TESTS = \
GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
- arraysort2 arraytype backw badargs beginfile1 beginfile2 binmode1 \
- charasbytes colonwarn clos1way clos1way2 clos1way3 clos1way4 \
- clos1way5 clos1way6 commas crlf dbugeval dbugeval2 dbugeval3 \
- dbugtypedre1 dbugtypedre2 delsub devfd devfd1 devfd2 dfacheck1 \
- dumpvars errno exit fieldwdth forcenum fpat1 fpat2 fpat3 fpat4 \
- fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull fsfwfs funlen functab1 \
- functab2 functab3 functab6 fwtest fwtest2 fwtest3 fwtest4 fwtest5 \
- fwtest6 fwtest7 fwtest8 genpot gensub gensub2 gensub3 getlndir \
- gnuops2 gnuops3 gnureops gsubind icasefs icasers id igncdym igncfs \
- ignrcas2 ignrcas4 ignrcase incdupe incdupe2 incdupe3 incdupe4 \
- incdupe5 incdupe6 incdupe7 include include2 indirectbuiltin \
- indirectbuiltin2 \
- indirectcall indirectcall2 indirectcall3 inf-nan-torture intarray iolint \
- isarrayunset lint lintexp lintindex lintint lintlength lintplus \
- lintold lintset lintwarn manyfiles match1 match2 match3 mbstr1 \
- mbstr2 mixed1 mktime modifiers muldimposix nastyparm negtime \
- next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b \
- nsawk1c nsawk2a nsawk2b nsbad nsbad_cmd nsforloop nsfuncrecurse \
- nsidentifier nsindirect1 nsindirect2 nsprof1 nsprof2 octdec patsplit posix \
- printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
- profile0 profile1 profile2 profile3 profile4 profile5 profile6 \
- profile7 profile8 profile9 profile10 profile11 profile12 profile13 \
- profile14 profile15 profile16 pty1 pty2 rebuf regexsub regnul1 regnul2 \
+ arraysort2 arraytype asortbool backw badargs beginfile1 \
+ beginfile2 binmode1 charasbytes clos1way clos1way2 clos1way3 \
+ clos1way4 clos1way5 clos1way6 colonwarn commas crlf dbugeval \
+ dbugeval2 dbugeval3 dbugtypedre1 dbugtypedre2 delsub devfd \
+ devfd1 devfd2 dfacheck1 dumpvars errno exit fieldwdth forcenum \
+ fpat1 fpat2 fpat3 fpat4 fpat5 fpat6 fpat7 fpat8 fpat9 fpatnull \
+ fsfwfs functab1 functab2 functab3 functab6 funlen fwtest fwtest2 \
+ fwtest3 fwtest4 fwtest5 fwtest6 fwtest7 fwtest8 genpot gensub \
+ gensub2 gensub3 getlndir gnuops2 gnuops3 gnureops gsubind \
+ icasefs icasers id igncdym igncfs ignrcas2 ignrcas4 ignrcase \
+ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \
+ include include2 indirectbuiltin indirectcall indirectcall2 \
+ indirectcall3 indirectbuiltin2 \
+ inf-nan-torture intarray iolint isarrayunset lint lintexp \
+ lintindex lintint lintlength lintold lintplus lintset lintwarn \
+ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime \
+ modifiers muldimposix nastyparm negtime next nondec nondec2 \
+ nonfatal1 nonfatal2 nonfatal3 nsawk1a nsawk1b nsawk1c nsawk2a \
+ nsawk2b nsbad nsbad_cmd nsforloop nsfuncrecurse nsindirect1 \
+ nsidentifier nsindirect2 nsprof1 nsprof2 octdec patsplit posix printfbad1 \
+ printfbad2 printfbad3 printfbad4 printhuge procinfs profile0 \
+ profile1 profile10 profile11 profile12 profile13 profile14 \
+ profile15 profile16 profile2 profile3 profile4 profile5 profile6 \
+ profile7 profile8 profile9 pty1 pty2 rebuf regexsub reginttrad \
profile17 \
- regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
+ regnul1 regnul2 regx8bit reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 sandbox1 shadow shadowbuiltin sortfor \
sortfor2 sortu sourcesplit split_after_fpat splitarg4 strftfld \
strftime strtonum strtonum1 stupid1 stupid2 stupid3 stupid4 stupid5 \
- switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 symtab7 \
- symtab8 symtab9 symtab10 symtab11 timeout typedregex1 typedregex2 \
+ switch2 symtab1 symtab10 symtab11 symtab2 symtab3 symtab4 symtab5 \
+ symtab6 symtab7 symtab8 symtab9 timeout typedregex1 typedregex2 \
symtab12 \
typedregex3 typedregex4 typedregex5 typedregex6 typeof1 typeof2 \
typeof3 typeof4 typeof5 typeof6 watchpoint1
@@ -1770,6 +1776,7 @@ SHLIB_TESTS = \
getfile \
inplace1 inplace2 inplace2bcomp inplace3 inplace3bcomp \
ordchr ordchr2 \
+ readall \
readdir readdir_test readdir_retest readfile readfile2 revout \
revtwoway rwarray \
testext time
@@ -1882,7 +1889,8 @@ EXPECTED_FAIL_ZOS = \
GENTESTS_UNUSED = Makefile.in checknegtime.awk dtdgport.awk fix-fmtspcl.awk \
fmtspcl-mpfr.ok fmtspcl.awk fmtspcl.tok gtlnbufv.awk hello.awk \
inchello.awk inclib.awk inplace.1.in inplace.2.in inplace.in \
- printfloat.awk readdir0.awk valgrind.awk xref.awk
+ printfloat.awk readdir0.awk valgrind.awk xref.awk \
+ readall1.awk readall2.awk
# List of tests on MinGW or DJGPP that need a different cmp program
@@ -2753,7 +2761,7 @@ inplace3bcomp::
testext::
@echo $@
- @-$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk
+ @-$(AWK) ' /^(@load|BEGIN|function)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk
@-$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \
then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \
@@ -2789,6 +2797,13 @@ readdir_retest:
@-$(AWK) -lreaddir_test -F/ -f "$(srcdir)"/$@.awk "$(top_srcdir)" > _$@
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
+readall:
+ @echo $@
+ @-$(AWK) -lrwarray -f "$(srcdir)"/$@1.awk -v "ofile=readall.state" > _$@
+ @-$(AWK) -lrwarray -f "$(srcdir)"/$@2.awk -v "ifile=readall.state" >> _$@
+ @-$(CMP) $@.ok _$@ && rm -f _$@
+ @-$(RM) -f readall.state
+
fts:
@echo $@
@-case `uname` in \
@@ -4305,6 +4320,11 @@ arraytype:
then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ ; \
else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ; fi
+asortbool:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
backw:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -4452,11 +4472,6 @@ fsfwfs:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-funlen:
- @echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
functab1:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -4477,6 +4492,11 @@ functab6:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+funlen:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
fwtest:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -4663,14 +4683,14 @@ lintlength:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-lintplus:
+lintold:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint-old < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-lintold:
+lintplus:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint-old < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
lintset:
@@ -4770,12 +4790,12 @@ nsfuncrecurse:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-nsidentifier:
+nsindirect1:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-nsindirect1:
+nsidentifier:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -4836,47 +4856,47 @@ procinfs:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile4:
+profile10:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile8:
+profile11:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile9:
+profile13:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile10:
+profile14:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile11:
+profile15:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile13:
+profile16:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile14:
+profile4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile15:
+profile8:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile16:
+profile9:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -4886,19 +4906,19 @@ regexsub:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-regnul1:
+profile17:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-regnul2:
+regnul1:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile17:
+regnul2:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
regx8bit:
@@ -5027,6 +5047,16 @@ symtab1:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+symtab10:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+symtab11:
+ @echo $@ $(ZOS_FAIL)
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
symtab2:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -5052,16 +5082,6 @@ symtab7:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-symtab10:
- @echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-symtab11:
- @echo $@ $(ZOS_FAIL)
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
timeout:
@echo $@ $(ZOS_FAIL)
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -5400,7 +5420,11 @@ diffout:
if [ "$$i" != "_*" ]; then \
echo ============== $$i ============= ; \
base=`echo $$i | sed 's/^_//'` ; \
- if [ -r $${base}.ok ]; then \
+ if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null && [ -r $${base}-mpfr.ok ]; then \
+ diff -u $${base}-mpfr.ok $$i ; \
+ elif echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null && [ -r "$(srcdir)"/$${base}-mpfr.ok ]; then \
+ diff -u "$(srcdir)"/$${base}-mpfr.ok $$i ; \
+ elif [ -r $${base}.ok ]; then \
diff -u $${base}.ok $$i ; \
else \
diff -u "$(srcdir)"/$${base}.ok $$i ; \
diff --git a/test/Maketests b/test/Maketests
index 8d19ea87..7bf4f61a 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1340,6 +1340,11 @@ arraytype:
then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ ; \
else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ; fi
+asortbool:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
backw:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1487,11 +1492,6 @@ fsfwfs:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-funlen:
- @echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
functab1:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1512,6 +1512,11 @@ functab6:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+funlen:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
fwtest:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1698,14 +1703,14 @@ lintlength:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-lintplus:
+lintold:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint-old < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-lintold:
+lintplus:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint-old < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
lintset:
@@ -1805,12 +1810,12 @@ nsfuncrecurse:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-nsidentifier:
+nsindirect1:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-nsindirect1:
+nsidentifier:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -1871,47 +1876,47 @@ procinfs:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile4:
+profile10:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile8:
+profile11:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile9:
+profile13:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile10:
+profile14:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile11:
+profile15:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile13:
+profile16:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile14:
+profile4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile15:
+profile8:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile16:
+profile9:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
@@ -1921,19 +1926,19 @@ regexsub:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-regnul1:
+profile17:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-regnul2:
+regnul1:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-profile17:
+regnul2:
@echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
regx8bit:
@@ -2062,6 +2067,16 @@ symtab1:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+symtab10:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+symtab11:
+ @echo $@ $(ZOS_FAIL)
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
symtab2:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -2087,16 +2102,6 @@ symtab7:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-symtab10:
- @echo $@
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
-symtab11:
- @echo $@ $(ZOS_FAIL)
- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
timeout:
@echo $@ $(ZOS_FAIL)
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/asortbool.awk b/test/asortbool.awk
new file mode 100644
index 00000000..3ee02cb2
--- /dev/null
+++ b/test/asortbool.awk
@@ -0,0 +1,19 @@
+BEGIN {
+ a[1] = "foo"
+ a[2] = -45
+ a[3] = 45
+ a[4][1] = 47
+ a[5] = mkbool(1)
+ a[6] = mkbool(0)
+
+ asort(a, b, "@val_type_asc")
+
+ j = length(b)
+ for (i = 1; i <= j; i++) {
+ printf("%d, %s: ", i, typeof(b[i]))
+ if (isarray(b[i]))
+ print b[i][1]
+ else
+ print b[i]
+ }
+}
diff --git a/test/asortbool.ok b/test/asortbool.ok
new file mode 100644
index 00000000..623e417a
--- /dev/null
+++ b/test/asortbool.ok
@@ -0,0 +1,6 @@
+1, number: -45
+2, number|bool: 0
+3, number|bool: 1
+4, number: 45
+5, string: foo
+6, array: 47
diff --git a/test/badargs.ok b/test/badargs.ok
index 5ec0558c..ea022461 100644
--- a/test/badargs.ok
+++ b/test/badargs.ok
@@ -32,7 +32,8 @@ Short options: GNU long options: (extensions)
-t --lint-old
-V --version
-To report bugs, see node `Bugs' in `gawk.info'
+To report bugs, use the `gawkbug' program.
+For full instructions, see the node `Bugs' in `gawk.info'
which is section `Reporting Problems and Bugs' in the
printed version. This same information may be found at
https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
diff --git a/test/dumpvars.ok b/test/dumpvars.ok
index 85d1c859..7caecd35 100644
--- a/test/dumpvars.ok
+++ b/test/dumpvars.ok
@@ -9,7 +9,7 @@ FILENAME: "-"
FNR: 3
FPAT: "[^[:space:]]+"
FS: " "
-FUNCTAB: array, 41 elements
+FUNCTAB: array, 42 elements
IGNORECASE: 0
LINT: 0
NF: 1
diff --git a/test/functab5.ok b/test/functab5.ok
index 9ac4295d..d27f1393 100644
--- a/test/functab5.ok
+++ b/test/functab5.ok
@@ -21,6 +21,7 @@ length'
log'
lshift'
match'
+mkbool'
mktime'
or'
patsplit'
diff --git a/test/id.ok b/test/id.ok
index ab4df74a..941d5add 100644
--- a/test/id.ok
+++ b/test/id.ok
@@ -52,6 +52,7 @@ length -> builtin
log -> builtin
lshift -> builtin
match -> builtin
+mkbool -> builtin
mktime -> builtin
or -> builtin
patsplit -> builtin
diff --git a/test/intest.awk b/test/intest.awk
index f030d07a..18e0cc4d 100644
--- a/test/intest.awk
+++ b/test/intest.awk
@@ -1,4 +1,4 @@
BEGIN {
- bool = ((b = 1) in c);
- print bool, b # gawk-3.0.1 prints "0 "; should print "0 1"
+ bool_result = ((b = 1) in c);
+ print bool_result, b # gawk-3.0.1 prints "0 "; should print "0 1"
}
diff --git a/test/nsidentifier.ok b/test/nsidentifier.ok
index 5743f94c..5bd7e7b2 100644
--- a/test/nsidentifier.ok
+++ b/test/nsidentifier.ok
@@ -90,6 +90,7 @@ list
log
lshift
match
+mkbool
mktime
n
ns::ns1
diff --git a/test/readall.ok b/test/readall.ok
new file mode 100644
index 00000000..b343af59
--- /dev/null
+++ b/test/readall.ok
@@ -0,0 +1,7 @@
+1
+1
+5.9 3 -2.327
+zebra[archie] = banana
+zebra[0] = apple
+zebra[3][foo] = bar
+zebra[3][bar] = foo
diff --git a/test/readall1.awk b/test/readall1.awk
new file mode 100644
index 00000000..2888d157
--- /dev/null
+++ b/test/readall1.awk
@@ -0,0 +1,10 @@
+BEGIN {
+ x = 5.9
+ y = 3
+ z = -2.327
+ zebra[0] = "apple"
+ zebra["archie"] = "banana"
+ zebra[3]["foo"] = "bar"
+ zebra[3]["bar"] = "foo"
+ print writeall(ofile)
+}
diff --git a/test/readall2.awk b/test/readall2.awk
new file mode 100644
index 00000000..8b79849a
--- /dev/null
+++ b/test/readall2.awk
@@ -0,0 +1,15 @@
+function printarray(n, x, i) {
+ for (i in x) {
+ if (isarray(x[i]))
+ printarray((n "[" i "]"), x[i])
+ else
+ printf "%s[%s] = %s\n", n, i, x[i]
+ }
+}
+
+BEGIN {
+ print readall(ifile)
+ print x, y, z
+ #print zebra[0], zebra[3]["foo"], zebra[3]["bar"]
+ printarray("zebra", zebra)
+}
diff --git a/test/rwarray.awk b/test/rwarray.awk
index c06fec21..dfd74ce0 100644
--- a/test/rwarray.awk
+++ b/test/rwarray.awk
@@ -11,6 +11,9 @@ BEGIN {
split("-2.4", f)
dict[strnum_sub] = f[1]
+ bool_sub = "bool-sub"
+ dict[bool_sub] = mkbool(1)
+
dict["x"] = "x"
dict["42"] = 42
@@ -56,4 +59,12 @@ BEGIN {
if (typeof(dict[strnum_sub]) != "strnum")
printf("dict[\"%s\"] should be strnum, is %s\n",
strnum_sub, typeof(dict[strnum_sub]));
+
+ if (typeof(dict[bool_sub]) != "number|bool")
+ printf("dict[\"%s\"] should be number|bool, is %s\n",
+ bool_sub, typeof(dict[bool_sub]));
+
+ if ((dict[bool_sub] "") != "1")
+ printf("dict[\"%s\"] should be 1, is %s\n",
+ bool_sub, dict[bool_sub]);
}
diff --git a/test/symtab11.ok b/test/symtab11.ok
index 7d4be46c..c46d3aed 100644
--- a/test/symtab11.ok
+++ b/test/symtab11.ok
@@ -53,6 +53,7 @@ BEGIN -- Functab is next
[log] = log
[lshift] = lshift
[match] = match
+[mkbool] = mkbool
[mktime] = mktime
[or] = or
[patsplit] = patsplit
diff --git a/test/symtab8.ok b/test/symtab8.ok
index da29b585..0cf40fe9 100644
--- a/test/symtab8.ok
+++ b/test/symtab8.ok
@@ -9,7 +9,7 @@ FIELDWIDTHS: ""
FNR: 1
FPAT: "[^[:space:]]+"
FS: " "
-FUNCTAB: array, 41 elements
+FUNCTAB: array, 42 elements
IGNORECASE: 0
LINT: 0
NF: 1
diff --git a/test/testext-mpfr.ok b/test/testext-mpfr.ok
index 2c616c67..ec584216 100644
--- a/test/testext-mpfr.ok
+++ b/test/testext-mpfr.ok
@@ -48,6 +48,8 @@ test_array_param: argument is not undefined (1)
test_array_param() returned 0
isarray(a_scalar) = 0
+test_array_create returned 1
+good: we have an array
Initial value of LINT is 0
print_do_lint: lint = 0
print_do_lint() returned 1
diff --git a/test/testext.ok b/test/testext.ok
index fbc3c263..1d058302 100644
--- a/test/testext.ok
+++ b/test/testext.ok
@@ -48,6 +48,8 @@ test_array_param: argument is not undefined (1)
test_array_param() returned 0
isarray(a_scalar) = 0
+test_array_create returned 1
+good: we have an array
Initial value of LINT is 0
print_do_lint: lint = 0
print_do_lint() returned 1