diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 90 | ||||
-rw-r--r-- | test/ChangeLog | 25 | ||||
-rw-r--r-- | test/Makefile.am | 53 | ||||
-rw-r--r-- | test/Makefile.in | 118 | ||||
-rw-r--r-- | test/Maketests | 65 | ||||
-rw-r--r-- | test/asortbool.awk | 19 | ||||
-rw-r--r-- | test/asortbool.ok | 6 | ||||
-rw-r--r-- | test/dumpvars.ok | 2 | ||||
-rw-r--r-- | test/functab5.ok | 1 | ||||
-rw-r--r-- | test/id.ok | 1 | ||||
-rw-r--r-- | test/intest.awk | 4 | ||||
-rw-r--r-- | test/rwarray.awk | 11 | ||||
-rw-r--r-- | test/symtab11.ok | 1 | ||||
-rw-r--r-- | test/symtab8.ok | 2 |
14 files changed, 194 insertions, 204 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 7db73f3c..66882c59 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -137,16 +137,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 abd1fc00..27f12dbb 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 \ @@ -1438,34 +1440,35 @@ 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 \ - indirectcall indirectcall2 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 \ - regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ + 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 \ + 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 \ + 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 \ typedregex3 typedregex4 typedregex5 typedregex6 typeof1 typeof2 \ typeof3 typeof4 typeof5 typeof6 watchpoint1 diff --git a/test/Makefile.in b/test/Makefile.in index ab45c3aa..a755b633 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 \ @@ -1704,34 +1706,35 @@ 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 \ - indirectcall indirectcall2 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 \ - regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ + 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 \ + 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 \ + 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 \ typedregex3 typedregex4 typedregex5 typedregex6 typeof1 typeof2 \ typeof3 typeof4 typeof5 typeof6 watchpoint1 @@ -4269,6 +4272,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: $$? >>_$@ @@ -4416,11 +4424,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: $$? >>_$@ @@ -4441,6 +4444,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: $$? >>_$@ @@ -4622,14 +4630,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: @@ -4729,12 +4737,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 _$@ @@ -4795,47 +4803,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 _$@ @@ -4981,6 +4989,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: $$? >>_$@ @@ -5006,16 +5024,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/Maketests b/test/Maketests index 4c4cfa62..923e1f78 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1330,6 +1330,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: $$? >>_$@ @@ -1477,11 +1482,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: $$? >>_$@ @@ -1502,6 +1502,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: $$? >>_$@ @@ -1683,14 +1688,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: @@ -1790,12 +1795,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 _$@ @@ -1856,47 +1861,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 _$@ @@ -2042,6 +2047,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: $$? >>_$@ @@ -2067,16 +2082,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/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' @@ -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/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 |