diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 14:52:31 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-07-16 14:52:31 +0300 |
commit | 3ba50a15ebd976f7a88393e2e45dc14b6478b9a9 (patch) | |
tree | 6a6bbe6bed1141051fefe94b2d39eacd4854235a /test | |
parent | 6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f (diff) | |
download | gawk-3ba50a15ebd976f7a88393e2e45dc14b6478b9a9.tar.gz |
Move to gawk-3.1.7.gawk-3.1.7
Diffstat (limited to 'test')
45 files changed, 996 insertions, 355 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 0284ac23..2b818b63 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,121 @@ +Tue Jul 21 22:28:56 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Release 3.1.7: Release tar file made. + +Fri Jul 3 13:04:55 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (charset-tests): Moved tests that can fail based on + character set and locale issues into a separate section. + +Wed Jun 24 22:30:31 2009 Arnold D. Robbins <arnold@skeeve.com> + + * lintold.awk: Changed to avoid floating point problems on VMS. + +Wed Jun 24 05:39:00 2009 Arnold D. Robbins <arnold@skeeve.com> + + * printfbad2.awk, printfbad2.ok: Adjusted for systems where sed + will add a final newline if the input didn't contain one. + +Mon Jun 22 00:44:50 2009 Pat Rankin <rankin@pactechdata.com> + + * getlndir.awk (SRCDIR): Allow caller to override "." as directory. + * intformat.awk (HUGEVAL): Allow caller to override the largest + value, and restructure 10^x and 2^y loops to use it without + overflowing on non-IEEE floating pointing hosts. + +Tue Jun 23 05:26:52 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (MACHINE_TESTS): Move fmtspcl to here per Pat Rankin. + +Fri Jun 19 14:26:55 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (GAWK_EXT_TESTS): Fixed sorting of tests. + Removed ovrflow1 test since double1 is a superset; thanks + to Pat Rankin. + * (ovrflow1.awk, ovrflow1.ok): Removed. + +Thu Jun 18 05:46:32 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (localenl): Per Michal Jaegermann, send stderr output + to /dev/null. + * (machine-tests): Moved several tests to new section for tests + whose output can vary by hardware. + +Thu Jun 11 04:50:44 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (lc_num1): Don't need --posix, changed command line + so that AWKPATH influences again. Thanks to Corinna Vinschen + for making me fix this. + +Wed Jun 10 08:28:13 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (lc_num1, printfbad2): Fix so building outside the + source directory works. + +Thu May 21 21:10:53 2009 Arnold D. Robbins <arnold@skeeve.com> + + * badargs.ok: Updated. + +Fri May 15 14:38:16 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (paramres): New test. + * paramres.awk, paramres.ok: New files. + +Fri Mar 27 10:57:49 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (printfbad2): New test. + * printfbad2.awk, printfbad2.in, printfbad2.ok: New files. + +Tue Feb 3 22:08:27 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (uparrfs): New test. + * uparrfs.awk, uparrfs.in, uparrfs.ok: New files. + +Mon Jan 5 22:53:26 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (getlndir): New test. + * getlndir.awk, getlndir.ok: New files. + +Mon Dec 29 22:46:10 2008 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (mbprintf3): New test. + * mbprintf3.awk, mbprintf3.in, mbprintf3.ok: New files. + +Thu Dec 18 20:57:39 2008 Stepan Kasal <skasal@redhat.com> + + * lc_num1.awk, lc_num1.ok: Test that the quote modifier in + printf is not sticky. + * Makefile.am: Add it. + * Gentests: Allow _ in test names. + +Thu Dec 11 21:36:11 2008 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (mbstr1): New test. + * mbstr1.awk, mbstr1.ok: New files. + +Thu Dec 4 22:44:39 2008 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (closebad): New test. + * closebad.awk, closebad.ok: New files. + +Thu Jul 31 21:44:21 2008 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (match3, gsubtst6): New tests. + * match3.awk, match3.in, match3.ok: New files. + * gsubtst6.awk, gsubtst6.ok: New files. + +Fri May 2 12:43:51 2008 Steffen Schuler <schuler.steffen@googlemail.com> + + * Makefile.am (mbfw1): Add code for test to use a UTF locale. + +Wed Apr 23 22:13:47 2008 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (funlen, mbfw1, mbprintf1, mbprintf2): New tests. + * funlen.awk, funlen.in, funlen.ok: New files. + * mbfw1.awk, mbfw1.in, mbfw1.ok: New files. + * mbprintf1.awk, mbprintf1.in, mbprintf1.ok: New files. + * mbprintf2.awk, mbprintf2.ok: New files. + Mon Oct 22 08:49:05 2007 Arnold D. Robbins <arnold@skeeve.com> * Release 3.1.6: Release tar file made. diff --git a/test/Gentests b/test/Gentests index 58416e42..b4d62f41 100755 --- a/test/Gentests +++ b/test/Gentests @@ -45,7 +45,7 @@ BEGIN { next } -/^[a-zA-Z][a-zA-Z0-9]*:/ { +/^[a-zA-Z_][a-zA-Z0-9_]*:/ { # remember all targets from Makefile.am sub(/:.*/,"") targets[$0] diff --git a/test/Makefile.am b/test/Makefile.am index 9b4137de..cea095fb 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,7 +1,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2006 the Free Software Foundation, Inc. +# Copyright (C) 1988-2008 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -107,6 +107,8 @@ EXTRA_DIST = \ clobber.ok \ clos1way.awk \ clos1way.ok \ + closebad.awk \ + closebad.ok \ clsflnam.awk \ clsflnam.in \ clsflnam.ok \ @@ -211,6 +213,9 @@ EXTRA_DIST = \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ + funlen.awk \ + funlen.in \ + funlen.ok \ funsemnl.awk \ funsemnl.ok \ funsmnam.awk \ @@ -239,6 +244,8 @@ EXTRA_DIST = \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ + getlndir.awk \ + getlndir.ok \ getlnhd.awk \ getlnhd.ok \ getnr2tb.awk \ @@ -267,6 +274,8 @@ EXTRA_DIST = \ gsubtst5.awk \ gsubtst5.in \ gsubtst5.ok \ + gsubtst6.awk \ + gsubtst6.ok \ gtlnbufv.awk \ hex.awk \ hex.ok \ @@ -300,6 +309,8 @@ EXTRA_DIST = \ intprec.ok \ iobug1.awk \ iobug1.ok \ + lc_num1.awk \ + lc_num1.ok \ leaddig.awk \ leaddig.ok \ leadnl.awk \ @@ -332,8 +343,24 @@ EXTRA_DIST = \ match1.ok \ match2.awk \ match2.ok \ + match3.awk \ + match3.in \ + match3.ok \ math.awk \ math.ok \ + mbfw1.awk \ + mbfw1.in \ + mbfw1.ok \ + mbprintf1.awk \ + mbprintf1.in \ + mbprintf1.ok \ + mbprintf2.awk \ + mbprintf2.ok \ + mbprintf3.awk \ + mbprintf3.in \ + mbprintf3.ok \ + mbstr1.awk \ + mbstr1.ok \ membug1.awk \ membug1.in \ membug1.ok \ @@ -424,10 +451,10 @@ EXTRA_DIST = \ out1.ok \ out2.ok \ out3.ok \ - ovrflow1.awk \ - ovrflow1.ok \ paramdup.awk \ paramdup.ok \ + paramres.awk \ + paramres.ok \ paramtyp.awk \ paramtyp.ok \ parse1.awk \ @@ -463,6 +490,9 @@ EXTRA_DIST = \ printf1.ok \ printfbad1.awk \ printfbad1.ok \ + printfbad2.awk \ + printfbad2.in \ + printfbad2.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -615,6 +645,9 @@ EXTRA_DIST = \ uninitialized.ok \ unterm.awk \ unterm.ok \ + uparrfs.awk \ + uparrfs.in \ + uparrfs.ok \ whiny.awk \ whiny.in \ whiny.ok \ @@ -648,43 +681,52 @@ TESTS_WE_ARE_NOT_DOING_YET_FIXME_ONE_DAY = longdbl CLEANFILES = core core.* fmtspcl.ok # try to keep these sorted -BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 \ - arrayprm2 arrayprm3 arryref2 arryref3 arryref4 arryref5 arynasty \ - arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ - aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ - clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt datanonl defref \ - delarprm delarpm2 delfunc dynlj eofsplit exitval1 exitval2 fldchg fldchgnf fmtspcl fmttest fnamedat \ - fnarray fnarray2 fnarydel fnaryscl fnasgnm fnmisc fnparydl \ - fordel forsimp fsbs fsspcoln fsrs fstabplus funsemnl funsmnam funstack getline \ - getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ - gsubtst2 gsubtst3 gsubtst4 gsubtst5 hex hsprint inputred intest intformat \ - intprec iobug1 leaddig leadnl litoct longsub longwrds manglprm math membug1 \ - messages minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr \ - nfneg nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \ - noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ - ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf ovrflow1 paramdup paramtyp \ - parse1 parsefld parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ - prt1eval prtoeval psx96sub rand rebt8b1 rebt8b2 redfilnm regeq \ - reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 \ - rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ - sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ - strcat1 strtod strnum1 subamp subi18n subsepnm subslash substr swaplns \ - synerr1 synerr2 tradanch \ - tweakfld uninit2 uninit3 uninit4 uninitialized unterm wideidx wideidx2 \ - widesub widesub2 widesub3 widesub4 wjposer1 zeroe0 zeroflag zero2 +BASIC_TESTS = \ + addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 arrayref \ + arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty arynocls \ + aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 \ + arysubnm asgext awkpath back89 backgsub childin clobber closebad \ + clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt \ + datanonl defref delarpm2 delarprm delfunc dynlj eofsplit exitval1 \ + exitval2 fldchg fldchgnf fnamedat fnarray fnarray2 fnaryscl fnasgnm \ + fnmisc fordel forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \ + funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \ + gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ + hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \ + longsub longwrds manglprm math membug1 messages minusstr mmap8k \ + mtchi18n nasty nasty2 negexp nested nfldstr nfneg nfset nlfldsep \ + nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \ + nors nulrsend numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts \ + onlynl opasnidx opasnslf paramdup paramres paramtyp parse1 parsefld \ + parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ + prt1eval prtoeval psx96sub rand rebt8b1 redfilnm regeq reindops \ + reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ + rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin sortempty \ + splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \ + strtod subamp subi18n subsepnm subslash substr swaplns synerr1 \ + synerr2 tradanch tweakfld uninit2 uninit3 uninit4 uninitialized \ + unterm uparrfs wideidx wideidx2 widesub widesub2 widesub3 \ + widesub4 wjposer1 zero2 zeroe0 zeroflag UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng -GAWK_EXT_TESTS = argtest asort asorti backw badargs binmode1 clos1way devfd devfd1 devfd2 double1 double2 \ - fieldwdth fsfwfs fwtest fwtest2 gensub gensub2 gnuops2 gnuops3 gnureops icasefs \ - icasers igncdym igncfs ignrcase ignrcas2 lint lintold match1 match2 manyfiles \ - nondec nondec2 posix procinfs printfbad1 regx8bit rebuf reint reint2 rsstart1 \ - rsstart2 rsstart3 rstest6 shadow sort1 strtonum strftime whiny +GAWK_EXT_TESTS = \ + argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 fieldwdth \ + fsfwfs funlen fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 \ + gnureops icasefs icasers igncdym igncfs ignrcas2 ignrcase lint lintold \ + manyfiles match1 match2 match3 mbprintf3 mbstr1 nondec nondec2 posix \ + printfbad1 printfbad2 procinfs rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow strftime strtonum EXTRA_TESTS = regtest inftest INET_TESTS = inetechu inetecht inetdayu inetdayt +MACHINE_TESTS = double1 double2 fmtspcl intformat + +LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ + mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny + # List of the tests which should be run with --lint option: NEED_LINT = defref fmtspcl noeffect nofmtch shadow uninit2 uninit3 uninit4 uninitialized @@ -714,7 +756,9 @@ check: msg \ printlang \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ - extend-msg-start gawk-extensions extend-msg-end + extend-msg-start gawk-extensions extend-msg-end \ + machine-msg-start machine-tests machine-msg-end \ + charset-msg-start charset-tests charset-msg-end @$(MAKE) pass-fail basic: $(BASIC_TESTS) @@ -723,10 +767,14 @@ unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) +charset-tests: $(LOCALE_CHARSET_TESTS) + extra: $(EXTRA_TESTS) inet inet: inetmesg $(INET_TESTS) +machine-tests: $(MACHINE_TESTS) + msg:: @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @@ -755,6 +803,25 @@ extend-msg-start: extend-msg-end: @echo "======== Done with gawk extension tests ========" +machine-msg-start: + @echo "======== Starting machine-specific tests ========" + +machine-msg-end: + @echo "======== Done with machine-specific tests ========" + +charset-msg-start: + @echo "======== Starting tests that can vary based on character set or locale support ========" + +charset-msg-end: + @echo "======== Done with tests that can vary based on character set or locale support ========" + + +lc_num1: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. @@ -1143,9 +1210,48 @@ reint2:: localenl:: @echo $@ - @$(srcdir)/$@.sh >_$@ + @$(srcdir)/$@.sh >_$@ 2>/dev/null @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +mbprintf1:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbprintf2:: + @echo $@ + @GAWKLOCALE=ja_JP.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbprintf3:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbfw1:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtst6:: + @echo $@ + @GAWKLOCALE=C ; $(AWK) -f $(srcdir)/$@.awk > _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbstr1:: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +printfbad2: printfbad2.ok + @echo $@ + @$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # Targets generated for other tests: diff --git a/test/Makefile.in b/test/Makefile.in index 0f273e65..75061808 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,7 +18,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2006 the Free Software Foundation, Inc. +# Copyright (C) 1988-2008 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -38,8 +39,9 @@ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -64,21 +66,25 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -97,11 +103,15 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ @@ -112,11 +122,15 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ @@ -126,7 +140,12 @@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -136,6 +155,9 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SED = @SED@ +SEGVINCLUDE = @SEGVINCLUDE@ +SEGVSUBDIR = @SEGVSUBDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ @@ -145,6 +167,7 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ @@ -152,6 +175,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -182,6 +206,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -192,8 +217,10 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ @@ -280,6 +307,8 @@ EXTRA_DIST = \ clobber.ok \ clos1way.awk \ clos1way.ok \ + closebad.awk \ + closebad.ok \ clsflnam.awk \ clsflnam.in \ clsflnam.ok \ @@ -384,6 +413,9 @@ EXTRA_DIST = \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ + funlen.awk \ + funlen.in \ + funlen.ok \ funsemnl.awk \ funsemnl.ok \ funsmnam.awk \ @@ -412,6 +444,8 @@ EXTRA_DIST = \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ + getlndir.awk \ + getlndir.ok \ getlnhd.awk \ getlnhd.ok \ getnr2tb.awk \ @@ -440,6 +474,8 @@ EXTRA_DIST = \ gsubtst5.awk \ gsubtst5.in \ gsubtst5.ok \ + gsubtst6.awk \ + gsubtst6.ok \ gtlnbufv.awk \ hex.awk \ hex.ok \ @@ -473,6 +509,8 @@ EXTRA_DIST = \ intprec.ok \ iobug1.awk \ iobug1.ok \ + lc_num1.awk \ + lc_num1.ok \ leaddig.awk \ leaddig.ok \ leadnl.awk \ @@ -505,8 +543,24 @@ EXTRA_DIST = \ match1.ok \ match2.awk \ match2.ok \ + match3.awk \ + match3.in \ + match3.ok \ math.awk \ math.ok \ + mbfw1.awk \ + mbfw1.in \ + mbfw1.ok \ + mbprintf1.awk \ + mbprintf1.in \ + mbprintf1.ok \ + mbprintf2.awk \ + mbprintf2.ok \ + mbprintf3.awk \ + mbprintf3.in \ + mbprintf3.ok \ + mbstr1.awk \ + mbstr1.ok \ membug1.awk \ membug1.in \ membug1.ok \ @@ -597,10 +651,10 @@ EXTRA_DIST = \ out1.ok \ out2.ok \ out3.ok \ - ovrflow1.awk \ - ovrflow1.ok \ paramdup.awk \ paramdup.ok \ + paramres.awk \ + paramres.ok \ paramtyp.awk \ paramtyp.ok \ parse1.awk \ @@ -636,6 +690,9 @@ EXTRA_DIST = \ printf1.ok \ printfbad1.awk \ printfbad1.ok \ + printfbad2.awk \ + printfbad2.in \ + printfbad2.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -788,6 +845,9 @@ EXTRA_DIST = \ uninitialized.ok \ unterm.awk \ unterm.ok \ + uparrfs.awk \ + uparrfs.in \ + uparrfs.ok \ whiny.awk \ whiny.in \ whiny.ok \ @@ -821,40 +881,48 @@ TESTS_WE_ARE_NOT_DOING_YET_FIXME_ONE_DAY = longdbl CLEANFILES = core core.* fmtspcl.ok # try to keep these sorted -BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 \ - arrayprm2 arrayprm3 arryref2 arryref3 arryref4 arryref5 arynasty \ - arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ - aryprm8 arysubnm asgext awkpath back89 backgsub childin clobber \ - clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt datanonl defref \ - delarprm delarpm2 delfunc dynlj eofsplit exitval1 exitval2 fldchg fldchgnf fmtspcl fmttest fnamedat \ - fnarray fnarray2 fnarydel fnaryscl fnasgnm fnmisc fnparydl \ - fordel forsimp fsbs fsspcoln fsrs fstabplus funsemnl funsmnam funstack getline \ - getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ - gsubtst2 gsubtst3 gsubtst4 gsubtst5 hex hsprint inputred intest intformat \ - intprec iobug1 leaddig leadnl litoct longsub longwrds manglprm math membug1 \ - messages minusstr mmap8k mtchi18n nasty nasty2 negexp nested nfldstr \ - nfneg nfset nlfldsep nlinstr nlstrina noeffect nofile nofmtch noloop1 \ - noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ - ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf ovrflow1 paramdup paramtyp \ - parse1 parsefld parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ - prt1eval prtoeval psx96sub rand rebt8b1 rebt8b2 redfilnm regeq \ - reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 \ - rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ - sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ - strcat1 strtod strnum1 subamp subi18n subsepnm subslash substr swaplns \ - synerr1 synerr2 tradanch \ - tweakfld uninit2 uninit3 uninit4 uninitialized unterm wideidx wideidx2 \ - widesub widesub2 widesub3 widesub4 wjposer1 zeroe0 zeroflag zero2 +BASIC_TESTS = \ + addcomma anchgsub argarray arrayparm arrayprm2 arrayprm3 arrayref \ + arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty arynocls \ + aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 aryprm8 \ + arysubnm asgext awkpath back89 backgsub childin clobber closebad \ + clsflnam compare compare2 concat1 concat2 concat3 concat4 convfmt \ + datanonl defref delarpm2 delarprm delfunc dynlj eofsplit exitval1 \ + exitval2 fldchg fldchgnf fnamedat fnarray fnarray2 fnaryscl fnasgnm \ + fnmisc fordel forsimp fsbs fsrs fsspcoln fstabplus funsemnl funsmnam \ + funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm \ + gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \ + hex hsprint inputred intest intprec iobug1 leaddig leadnl litoct \ + longsub longwrds manglprm math membug1 messages minusstr mmap8k \ + mtchi18n nasty nasty2 negexp nested nfldstr nfneg nfset nlfldsep \ + nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl noparms \ + nors nulrsend numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts \ + onlynl opasnidx opasnslf paramdup paramres paramtyp parse1 parsefld \ + parseme pcntplus prdupval prec printf0 printf1 prmarscl prmreuse \ + prt1eval prtoeval psx96sub rand rebt8b1 redfilnm regeq reindops \ + reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 rstest2 \ + rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin sortempty \ + splitargv splitarr splitdef splitvar splitwht strcat1 strnum1 \ + strtod subamp subi18n subsepnm subslash substr swaplns synerr1 \ + synerr2 tradanch tweakfld uninit2 uninit3 uninit4 uninitialized \ + unterm uparrfs wideidx wideidx2 widesub widesub2 widesub3 \ + widesub4 wjposer1 zero2 zeroe0 zeroflag UNIX_TESTS = fflush getlnhd localenl pid pipeio1 pipeio2 poundbang space strftlng -GAWK_EXT_TESTS = argtest asort asorti backw badargs binmode1 clos1way devfd devfd1 devfd2 double1 double2 \ - fieldwdth fsfwfs fwtest fwtest2 gensub gensub2 gnuops2 gnuops3 gnureops icasefs \ - icasers igncdym igncfs ignrcase ignrcas2 lint lintold match1 match2 manyfiles \ - nondec nondec2 posix procinfs printfbad1 regx8bit rebuf reint reint2 rsstart1 \ - rsstart2 rsstart3 rstest6 shadow sort1 strtonum strftime whiny +GAWK_EXT_TESTS = \ + argtest backw badargs binmode1 clos1way devfd devfd1 devfd2 fieldwdth \ + fsfwfs funlen fwtest fwtest2 gensub gensub2 getlndir gnuops2 gnuops3 \ + gnureops icasefs icasers igncdym igncfs ignrcas2 ignrcase lint lintold \ + manyfiles match1 match2 match3 mbprintf3 mbstr1 nondec nondec2 posix \ + printfbad1 printfbad2 procinfs rebuf regx8bit reint reint2 rsstart1 \ + rsstart2 rsstart3 rstest6 shadow strftime strtonum EXTRA_TESTS = regtest inftest INET_TESTS = inetechu inetecht inetdayu inetdayt +MACHINE_TESTS = double1 double2 fmtspcl intformat +LOCALE_CHARSET_TESTS = asort asorti fmttest fnarydel fnparydl lc_num1 mbfw1 \ + mbprintf1 mbprintf2 rebt8b2 sort1 sprintfc whiny + # List of the tests which should be run with --lint option: NEED_LINT = defref fmtspcl noeffect nofmtch shadow uninit2 uninit3 uninit4 uninitialized @@ -876,14 +944,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Maketests $(am__configur @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu test/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -901,6 +969,13 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs tags: TAGS TAGS: @@ -924,13 +999,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -959,11 +1038,12 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean-am: clean-generic mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile @@ -975,6 +1055,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -983,18 +1065,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -1003,7 +1095,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-generic +mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am @@ -1017,15 +1109,16 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Message stuff is to make it a little easier to follow. @@ -1035,7 +1128,9 @@ check: msg \ printlang \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ - extend-msg-start gawk-extensions extend-msg-end + extend-msg-start gawk-extensions extend-msg-end \ + machine-msg-start machine-tests machine-msg-end \ + charset-msg-start charset-tests charset-msg-end @$(MAKE) pass-fail basic: $(BASIC_TESTS) @@ -1044,10 +1139,14 @@ unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) +charset-tests: $(LOCALE_CHARSET_TESTS) + extra: $(EXTRA_TESTS) inet inet: inetmesg $(INET_TESTS) +machine-tests: $(MACHINE_TESTS) + msg:: @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @@ -1076,6 +1175,24 @@ extend-msg-start: extend-msg-end: @echo "======== Done with gawk extension tests ========" +machine-msg-start: + @echo "======== Starting machine-specific tests ========" + +machine-msg-end: + @echo "======== Done with machine-specific tests ========" + +charset-msg-start: + @echo "======== Starting tests that can vary based on character set or locale support ========" + +charset-msg-end: + @echo "======== Done with tests that can vary based on character set or locale support ========" + +lc_num1: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. # @@ -1463,7 +1580,47 @@ reint2:: localenl:: @echo $@ - @$(srcdir)/$@.sh >_$@ + @$(srcdir)/$@.sh >_$@ 2>/dev/null + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbprintf1:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbprintf2:: + @echo $@ + @GAWKLOCALE=ja_JP.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbprintf3:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbfw1:: + @echo $@ + @GAWKLOCALE=en_US.UTF-8 ; export GAWKLOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtst6:: + @echo $@ + @GAWKLOCALE=C ; $(AWK) -f $(srcdir)/$@.awk > _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +mbstr1:: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +printfbad2: printfbad2.ok + @echo $@ + @$(AWK) --lint -f $(srcdir)/$@.awk $(srcdir)/$@.in 2>&1 | sed 's;\$(srcdir)/;;g' >_$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program @@ -1482,23 +1639,23 @@ arrayparm: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrayref: - @echo arrayref +arrayprm2: + @echo arrayprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrymem1: - @echo arrymem1 +arrayprm3: + @echo arrayprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrayprm2: - @echo arrayprm2 +arrayref: + @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrayprm3: - @echo arrayprm3 +arrymem1: + @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1592,6 +1749,11 @@ childin: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +closebad: + @echo closebad + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1632,13 +1794,13 @@ defref: @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -delarprm: - @echo delarprm +delarpm2: + @echo delarpm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -delarpm2: - @echo delarpm2 +delarprm: + @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -1672,11 +1834,6 @@ fldchgnf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -fmttest: - @echo fmttest - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1692,11 +1849,6 @@ fnarray2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -fnarydel: - @echo fnarydel - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1712,11 +1864,6 @@ fnmisc: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -fnparydl: - @echo fnparydl - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fordel: @echo fordel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1822,11 +1969,6 @@ intest: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -intformat: - @echo intformat - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2002,13 +2144,13 @@ opasnslf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -ovrflow1: - @echo ovrflow1 +paramdup: + @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -paramdup: - @echo paramdup +paramres: + @echo paramres @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -2087,11 +2229,6 @@ rebt8b1: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -rebt8b2: - @echo rebt8b2 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2197,26 +2334,21 @@ splitwht: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -sprintfc: - @echo sprintfc - @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - strcat1: @echo strcat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -strtod: - @echo strtod - @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - strnum1: @echo strnum1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +strtod: + @echo strtod + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + subsepnm: @echo subsepnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2272,11 +2404,21 @@ unterm: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +uparrfs: + @echo uparrfs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + wjposer1: @echo wjposer1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +zero2: + @echo zero2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2287,26 +2429,11 @@ zeroflag: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -zero2: - @echo zero2 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - getlnhd: @echo getlnhd @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -asort: - @echo asort - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - -asorti: - @echo asorti - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - backw: @echo backw @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2317,16 +2444,6 @@ clos1way: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -double1: - @echo double1 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - -double2: - @echo double2 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fieldwdth: @echo fieldwdth @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2337,6 +2454,11 @@ fsfwfs: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +funlen: + @echo funlen + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + fwtest: @echo fwtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2357,6 +2479,11 @@ gensub2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +getlndir: + @echo getlndir + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2417,6 +2544,11 @@ match2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +match3: + @echo match3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + nondec: @echo nondec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2427,18 +2559,13 @@ posix: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -procinfs: - @echo procinfs - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - printfbad1: @echo printfbad1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -regx8bit: - @echo regx8bit +procinfs: + @echo procinfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -2447,6 +2574,11 @@ rebuf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +regx8bit: + @echo regx8bit + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + rstest6: @echo rstest6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2457,14 +2589,64 @@ shadow: @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +strtonum: + @echo strtonum + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +double1: + @echo double1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +double2: + @echo double2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +intformat: + @echo intformat + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +asort: + @echo asort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +asorti: + @echo asorti + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fmttest: + @echo fmttest + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnarydel: + @echo fnarydel + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnparydl: + @echo fnparydl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rebt8b2: + @echo rebt8b2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -strtonum: - @echo strtonum - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +sprintfc: + @echo sprintfc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests @@ -2526,6 +2708,7 @@ efence: rm _$$i ; \ fi ; \ done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/test/Maketests b/test/Maketests index 8edf10c5..0da281d2 100644 --- a/test/Maketests +++ b/test/Maketests @@ -15,23 +15,23 @@ arrayparm: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrayref: - @echo arrayref +arrayprm2: + @echo arrayprm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrymem1: - @echo arrymem1 +arrayprm3: + @echo arrayprm3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrayprm2: - @echo arrayprm2 +arrayref: + @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -arrayprm3: - @echo arrayprm3 +arrymem1: + @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -125,6 +125,11 @@ childin: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +closebad: + @echo closebad + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -165,13 +170,13 @@ defref: @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -delarprm: - @echo delarprm +delarpm2: + @echo delarpm2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -delarpm2: - @echo delarpm2 +delarprm: + @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -205,11 +210,6 @@ fldchgnf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -fmttest: - @echo fmttest - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -225,11 +225,6 @@ fnarray2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -fnarydel: - @echo fnarydel - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -245,11 +240,6 @@ fnmisc: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -fnparydl: - @echo fnparydl - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fordel: @echo fordel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -355,11 +345,6 @@ intest: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -intformat: - @echo intformat - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -535,13 +520,13 @@ opasnslf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -ovrflow1: - @echo ovrflow1 +paramdup: + @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -paramdup: - @echo paramdup +paramres: + @echo paramres @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -620,11 +605,6 @@ rebt8b1: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -rebt8b2: - @echo rebt8b2 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -730,26 +710,21 @@ splitwht: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -sprintfc: - @echo sprintfc - @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - strcat1: @echo strcat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -strtod: - @echo strtod - @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - strnum1: @echo strnum1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +strtod: + @echo strtod + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + subsepnm: @echo subsepnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -805,11 +780,21 @@ unterm: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +uparrfs: + @echo uparrfs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + wjposer1: @echo wjposer1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +zero2: + @echo zero2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -820,26 +805,11 @@ zeroflag: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -zero2: - @echo zero2 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - getlnhd: @echo getlnhd @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -asort: - @echo asort - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - -asorti: - @echo asorti - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - backw: @echo backw @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -850,16 +820,6 @@ clos1way: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -double1: - @echo double1 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - -double2: - @echo double2 - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - fieldwdth: @echo fieldwdth @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -870,6 +830,11 @@ fsfwfs: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +funlen: + @echo funlen + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + fwtest: @echo fwtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -890,6 +855,11 @@ gensub2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +getlndir: + @echo getlndir + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -950,6 +920,11 @@ match2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +match3: + @echo match3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + nondec: @echo nondec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -960,18 +935,13 @@ posix: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -procinfs: - @echo procinfs - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ - printfbad1: @echo printfbad1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -regx8bit: - @echo regx8bit +procinfs: + @echo procinfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ @@ -980,6 +950,11 @@ rebuf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +regx8bit: + @echo regx8bit + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + rstest6: @echo rstest6 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -990,14 +965,64 @@ shadow: @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +strtonum: + @echo strtonum + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +double1: + @echo double1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +double2: + @echo double2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +intformat: + @echo intformat + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +asort: + @echo asort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +asorti: + @echo asorti + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fmttest: + @echo fmttest + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnarydel: + @echo fnarydel + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnparydl: + @echo fnparydl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rebt8b2: + @echo rebt8b2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ -strtonum: - @echo strtonum - @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +sprintfc: + @echo sprintfc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests diff --git a/test/badargs.ok b/test/badargs.ok index 28e42360..44528adf 100644 --- a/test/badargs.ok +++ b/test/badargs.ok @@ -6,6 +6,7 @@ POSIX options: GNU long options: -F fs --field-separator=fs -v var=val --assign=var=val -m[fr] val + -O --optimize -W compat --compat -W copyleft --copyleft -W copyright --copyright diff --git a/test/closebad.awk b/test/closebad.awk new file mode 100644 index 00000000..83133ae8 --- /dev/null +++ b/test/closebad.awk @@ -0,0 +1,7 @@ +BEGIN { + f = "/no/such/file/1" + print (getline junk < f) + print close(f) + f = "/no/such/file/2" + print close(f) +} diff --git a/test/closebad.ok b/test/closebad.ok new file mode 100644 index 00000000..64861d87 --- /dev/null +++ b/test/closebad.ok @@ -0,0 +1,3 @@ +-1 +-1 +-1 diff --git a/test/funlen.awk b/test/funlen.awk new file mode 100644 index 00000000..e881fcbf --- /dev/null +++ b/test/funlen.awk @@ -0,0 +1,69 @@ +# Date: Sat, 15 Mar 2008 16:21:19 +0100 +# From: Hermann Peifer <peifer@gmx.net> +# Subject: [Fwd: Gawk length(array) bug] +# To: bug-gawk@gnu.org +# Cc: Aharon Robbins <arnold@skeeve.com> +# Message-id: <47DBE96F.1060406@gmx.net> +# +# See below. Regards, Hermann +# +# -------- Original Message -------- +# Subject: Re: Gawk length(array) question +# Date: Sat, 15 Mar 2008 08:02:03 -0500 +# From: Ed Morton <morton@lsupcaemnt.com> +# Newsgroups: comp.lang.awk +# References: <47DBAE29.4050709@gmx.eu> +# +# On 3/15/2008 6:08 AM, Hermann Peifer wrote: +# > Hi All, +# > +# > The Gawk man page says: +# > > Starting with version 3.1.5, as a non-standard extension, +# > > with an array argument, length() returns the number +# > > of elements in the array. +# > +# > It looks like Gawk's length(array) extension does not work inside +# > functions. Is this a bug or feature or am I missing something? See the +# > example below. I am using GNU Awk 3.1.6 +# > +# > $ cat testdata +# > CD NAME +# > AT Austria +# > BG Bulgaria +# > CH Switzerland +# > DE Germany +# > EE Estonia +# > FR France +# > GR Greece +# > +# > $ cat test.awk +# > +# Populate array +NR > 1 { array[$1] = $2 } + +# Print array length and call function A +END { print "array:",length(array) ; A(array) } + +function A(array_A) { print "array_A:", length(array_A) } +# > +# > $ gawk -f test.awk testdata +# > array: 7 +# > gawk: test.awk:8: (FILENAME=data FNR=8) fatal: attempt to use array +# > `array_A (from array)' in a scalar context +# > +# > BTW, there is no such error if I have asort(array_A) or asorti(array_A) +# > inside the function. +# > +# > Hermann +# +# I get the same result with gawk 3.1.6 for cygwin. Obviously you can work +# around +# it since asort() returns the number of elements in an array just like +# length() +# is supposed to (or "for (i in array) lgth++" if you don't want to be +# gawk-specific) but it does seem like a bug. Anyone know if there's a list of +# known gawk bugs on-line somewhere? +# +# Ed. +# +# diff --git a/test/funlen.in b/test/funlen.in new file mode 100644 index 00000000..d0e0b04f --- /dev/null +++ b/test/funlen.in @@ -0,0 +1,8 @@ +CD NAME +AT Austria +BG Bulgaria +CH Switzerland +DE Germany +EE Estonia +FR France +GR Greece diff --git a/test/funlen.ok b/test/funlen.ok new file mode 100644 index 00000000..2e2ba9df --- /dev/null +++ b/test/funlen.ok @@ -0,0 +1,2 @@ +array: 7 +array_A: 7 diff --git a/test/getlndir.awk b/test/getlndir.awk new file mode 100644 index 00000000..250c5abb --- /dev/null +++ b/test/getlndir.awk @@ -0,0 +1,7 @@ +BEGIN { + if (!SRCDIR) SRCDIR = "." + OFS = ", " + x = 4 + ret = (getline x < SRCDIR) + print x, ret, ERRNO +} diff --git a/test/getlndir.ok b/test/getlndir.ok new file mode 100644 index 00000000..a9bafa01 --- /dev/null +++ b/test/getlndir.ok @@ -0,0 +1 @@ +4, -1, Is a directory diff --git a/test/gsubtst6.awk b/test/gsubtst6.awk new file mode 100644 index 00000000..2b1df51d --- /dev/null +++ b/test/gsubtst6.awk @@ -0,0 +1,24 @@ +# From: "T. X. G." <leopardie333@yahoo.com> +# Subject: Bug in regular expression \B using DFA +# Date: Wed, 16 Jul 2008 05:23:09 -0700 (PDT) +# To: bug-gawk@gnu.org +# +# ~ gawk --version +# GNU Awk 3.1.6 +# Copyright (C) 1989, 1991-2007 Free Software Foundation. +# +# ...... +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~ LC_ALL=C gawk 'BEGIN{x="abcd";gsub(/\B/,":",x);print x}' +# a:b:cd +# +# ~ LC_ALL=en_US.UTF-8 gawk 'BEGIN{x="abcd";gsub(/\B/,":",x);print x}' +# a:b:c:d +# +# ~ GAWK_NO_DFA=1 gawk 'BEGIN{x="abcd";gsub(/\B/,":",x);print x}' +# a:b:c:d + +BEGIN { x = "abcd"; gsub(/\B/,":",x); print x } diff --git a/test/gsubtst6.ok b/test/gsubtst6.ok new file mode 100644 index 00000000..5b6bb798 --- /dev/null +++ b/test/gsubtst6.ok @@ -0,0 +1 @@ +a:b:c:d diff --git a/test/intformat.awk b/test/intformat.awk index 56ce606b..2f235290 100644 --- a/test/intformat.awk +++ b/test/intformat.awk @@ -46,6 +46,10 @@ function check_cons(fmt,base,rot,mexp, i,j,dig,res,s) { } BEGIN { + # this doesn't necessarily have to be exact since we're checking + # magnitude rather than precision + if (!HUGEVAL) HUGEVAL = 1.7976931348623157e+308 + formats["%s"] = "" formats["%d"] = "" formats["%.0f"] = "" @@ -53,13 +57,23 @@ BEGIN { formats["0x%x"] = "non-decimal" check(0,"0") - for (i = 0; i <= 308; i++) { + limit = HUGEVAL / 10 + value = 1 + for (i = 0; ; i++) { check(10^i,"10^"i) check(-10^i,"-10^"i) + #[probably should test value against 10^i here] + if (value >= limit) break + value *= 10 } - for (i = 0; i <= 1023; i++) { + limit = HUGEVAL / 2 + value = 1 + for (i = 0; ; i++) { check(2^i,"2^"i) check(-2^i,"-2^"i) + #[probably should test value against 2^i here] + if (value >= limit) break + value *= 2 } check_cons("%d",10,1,9) diff --git a/test/lc_num1.awk b/test/lc_num1.awk new file mode 100644 index 00000000..c982a146 --- /dev/null +++ b/test/lc_num1.awk @@ -0,0 +1,4 @@ +# Bug reported by Ulrich Drepper. +BEGIN { + printf("%'d %d\n", 1000000, 1000000) +} diff --git a/test/lc_num1.ok b/test/lc_num1.ok new file mode 100644 index 00000000..1f65708e --- /dev/null +++ b/test/lc_num1.ok @@ -0,0 +1 @@ +1,000,000 1000000 diff --git a/test/lintold.awk b/test/lintold.awk index 61d12f2f..698187a3 100644 --- a/test/lintold.awk +++ b/test/lintold.awk @@ -8,7 +8,7 @@ BEGIN { if (2 in a) a[2] **= 2; if ((2,3) in a) - a[2,3] ^= 2 ** 3 ^ 15; + a[2,3] ^= 2 ** 3 ^ 5; } BEGIN { FS = "ab" diff --git a/test/match3.awk b/test/match3.awk new file mode 100644 index 00000000..f3b6b838 --- /dev/null +++ b/test/match3.awk @@ -0,0 +1,46 @@ +# Date: Mon, 28 Jul 2008 17:25:32 +0200 +# From: Dirk Zimoch <dirk.zimoch@psi.ch> +# Subject: match() prevents numeric strings from beeing treated numerically +# To: bug-gawk@gnu.org +# Message-id: <488DE4EC.6020400@psi.ch> +# +# In gawk version 3.1.5, numeric user input that is parsed with match() is not +# recognized as "numeric string" any more. I.e. mixed string-numeric comparison +# does not work any more. In version 3.1.1, it worked. (Even though the +# documentation never explicitly mentioned this behavior for match(), as it does +# for split(). But is says that "user input" should be treated that way.) +# +# awk 'BEGIN{match(".5",/.*/,a);print a[0]==.5?"OK":"FAULT"}' +# +# Version 3.1.1 prints OK, version 3.1.5 prints FAULT. +# +# awk '{match($0,/.*/,a);print a[0]==a[0]+0?"OK":"FAULT"}' << EOF +# 5 +# 5.0 +# 0.5 +# .5 +# EOF +# +# Version 3.1.1 prints +# OK +# OK +# OK +# OK +# +# Version 3.1.5 prints +# OK +# FAULT +# OK +# FAULT +# +# +# -- +# Dr. Dirk Zimoch +# Paul Scherrer Institut, WBGB/006 +# 5232 Villigen PSI, Switzerland +# Phone +41 56 310 5182 +# +{ + match($0,/.*/,a) + print a[0] == a[0]+0 ? "OK" : "FAULT" +} diff --git a/test/match3.in b/test/match3.in new file mode 100644 index 00000000..a45babdd --- /dev/null +++ b/test/match3.in @@ -0,0 +1,4 @@ +5 +5.0 +0.5 +.5 diff --git a/test/match3.ok b/test/match3.ok new file mode 100644 index 00000000..b462a5a7 --- /dev/null +++ b/test/match3.ok @@ -0,0 +1,4 @@ +OK +OK +OK +OK diff --git a/test/mbfw1.awk b/test/mbfw1.awk new file mode 100644 index 00000000..25d8e5cc --- /dev/null +++ b/test/mbfw1.awk @@ -0,0 +1,40 @@ +# Date: Sun, 16 Mar 2008 18:51:14 +0100 +# From: Hermann Peifer <peifer@gmx.eu> +# Subject: [Fwd: Gawk FIELDWIDTHS and multibyte characters] +# To: bug-gawk@gnu.org +# Message-id: <47DD5E12.2010403@gmx.eu> +# +# See below. Regards, Hermann +# +# --- Original Message --- +# +# Newsgroups: comp.lang.awk +# From: Hermann Peifer <peifer@gmx.eu> +# Date: Sun, 16 Mar 2008 01:23:38 -0700 (PDT) +# Subject: Gawk FIELDWIDTHS and multibyte characters +# +# Hi, +# +# It looks to me that Gawk's FIELDWIDTHS extension is not aware of +# multibyte characters, see my example below. +# +# $ cat testdata +# CDRegion Commune Site +# SEVästsverige Hallands län Kungsbacka +# SESmÃ¥land med öarna Västra Götalands länGöteborg +# SEKronoberg Alvesta Stenungsund +# +# $ file testdata +# testdata: UTF-8 Unicode text +# +# $ awk 'BEGIN{FIELDWIDTHS = "2 20 20 20"}{print $4}' testdata +# Site +# Kungsbacka +# länGöteborg +# Stenungsund +# +# Can someone confirm? +# +# Hermann +BEGIN { FIELDWIDTHS = "2 20 20 20" } +{ print $4 } diff --git a/test/mbfw1.in b/test/mbfw1.in new file mode 100644 index 00000000..58ba36a3 --- /dev/null +++ b/test/mbfw1.in @@ -0,0 +1,4 @@ +CDRegion Commune Site +SEVästsverige Hallands län Kungsbacka +SESmÃ¥land med öarna Västra Götalands länGöteborg +SEKronoberg Alvesta Stenungsund diff --git a/test/mbfw1.ok b/test/mbfw1.ok new file mode 100644 index 00000000..c0a80f1c --- /dev/null +++ b/test/mbfw1.ok @@ -0,0 +1,4 @@ +Site +Kungsbacka +Göteborg +Stenungsund diff --git a/test/mbprintf1.awk b/test/mbprintf1.awk new file mode 100644 index 00000000..974c109f --- /dev/null +++ b/test/mbprintf1.awk @@ -0,0 +1 @@ +{ printf "%-7s|\n", $0 } diff --git a/test/mbprintf1.in b/test/mbprintf1.in new file mode 100644 index 00000000..8ee09e6d --- /dev/null +++ b/test/mbprintf1.in @@ -0,0 +1,2 @@ +AAA +ÅÃÆ diff --git a/test/mbprintf1.ok b/test/mbprintf1.ok new file mode 100644 index 00000000..40935cc8 --- /dev/null +++ b/test/mbprintf1.ok @@ -0,0 +1,2 @@ +AAA | +ÅÃÆ | diff --git a/test/mbprintf2.awk b/test/mbprintf2.awk new file mode 100644 index 00000000..46c68135 --- /dev/null +++ b/test/mbprintf2.awk @@ -0,0 +1,4 @@ +BEGIN { + printf "%c\n", 65 + printf "%c\n", "AA" +} diff --git a/test/mbprintf2.ok b/test/mbprintf2.ok new file mode 100644 index 00000000..67aa8665 --- /dev/null +++ b/test/mbprintf2.ok @@ -0,0 +1,2 @@ +A +A diff --git a/test/mbprintf3.awk b/test/mbprintf3.awk new file mode 100644 index 00000000..1f99bd8f --- /dev/null +++ b/test/mbprintf3.awk @@ -0,0 +1 @@ +FNR == 1 { print $0; printf "%s\n", $0 } diff --git a/test/mbprintf3.in b/test/mbprintf3.in new file mode 100644 index 00000000..10971bc4 --- /dev/null +++ b/test/mbprintf3.in @@ -0,0 +1 @@ +COMPONENT suspended particulates <10 µm (air), day diff --git a/test/mbprintf3.ok b/test/mbprintf3.ok new file mode 100644 index 00000000..01317801 --- /dev/null +++ b/test/mbprintf3.ok @@ -0,0 +1,2 @@ +COMPONENT suspended particulates <10 µm (air), day +COMPONENT suspended particulates <10 µm (air), day diff --git a/test/mbstr1.awk b/test/mbstr1.awk new file mode 100644 index 00000000..2abcff21 --- /dev/null +++ b/test/mbstr1.awk @@ -0,0 +1,4 @@ +BEGIN { + print length("\x81\x82\x83\x84") + print index("\x81\x82\x83\x84", "\x81\x82") +} diff --git a/test/mbstr1.ok b/test/mbstr1.ok new file mode 100644 index 00000000..dcb4347b --- /dev/null +++ b/test/mbstr1.ok @@ -0,0 +1,2 @@ +4 +1 diff --git a/test/ovrflow1.awk b/test/ovrflow1.awk deleted file mode 100644 index 0506a06e..00000000 --- a/test/ovrflow1.awk +++ /dev/null @@ -1,82 +0,0 @@ -# From arnold@f7.net Thu Dec 15 08:57:08 2005 -# Return-Path: <arnold@f7.net> -# Received: from localhost (skeeve [127.0.0.1]) -# by skeeve.com (8.12.11/8.12.11) with ESMTP id jBF6ubXX003003 -# for <arnold@localhost>; Thu, 15 Dec 2005 08:57:08 +0200 -# Received: from pop.012.net.il [84.95.5.221] -# by localhost with POP3 (fetchmail-6.2.5) -# for arnold@localhost (single-drop); Thu, 15 Dec 2005 08:57:08 +0200 (IST) -# Received: from mtain3.012.net.il ([10.220.5.7]) -# by i_mss3.012.net.il (HyperSendmail v2004.12) -# with ESMTP id <0IRI007F9SHYRDF0@i_mss3.012.net.il> for arobbins@012.net.il; -# Thu, 15 Dec 2005 05:32:22 +0200 (IST) -# Received: from i_mtain1.012.net.il ([10.220.20.4]) -# by i_mtain3.012.net.il (HyperSendmail v2004.12) -# with ESMTP id <0IRI00CUNSHXU5D0@i_mtain3.012.net.il> for arobbins@012.net.il -# (ORCPT arobbins@012.net.il); Thu, 15 Dec 2005 05:32:22 +0200 (IST) -# Received: from f7.net ([64.34.169.74]) -# by i_mtain1.012.net.il (HyperSendmail v2004.12) -# with ESMTP id <0IRI005JEPNHIG00@i_mtain1.012.net.il> for arobbins@012.net.il; -# Thu, 15 Dec 2005 04:30:54 +0200 (IST) -# Received: (from arnold@localhost) by f7.net (8.11.7-20030920/8.11.7) -# id jBF2TkQ18162 for arobbins@012.net.il; Wed, 14 Dec 2005 20:29:46 -0600 -# Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) -# by f7.net (8.11.7-20030920/8.11.7) with ESMTP id jBF2Tis18148 for -# <arnold@skeeve.com>; Wed, 14 Dec 2005 20:29:44 -0600 -# Received: from monty-python.gnu.org ([199.232.76.173]) -# by fencepost.gnu.org with esmtp (Exim 4.34) -# id 1Emir1-0007i6-1e for bug-gawk@gnu.org; Wed, 14 Dec 2005 21:28:23 -0500 -# Received: from Debian-exim by monty-python.gnu.org with spam-scanned -# (Exim 4.34) id 1Emiv6-0006FV-9G for bug-gawk@gnu.org; Wed, -# 14 Dec 2005 21:32:37 -0500 -# Received: from [129.99.139.165] (helo=ece03.nas.nasa.gov) -# by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) -# (Exim 4.34) id 1Emiv5-0006F0-UO for bug-gawk@gnu.org; Wed, -# 14 Dec 2005 21:32:36 -0500 -# Received: from ece03.nas.nasa.gov (localhost.localdomain [127.0.0.1]) -# by ece03.nas.nasa.gov (8.12.11/8.12.11) with ESMTP id jBF2TcNa022308; Wed, -# 14 Dec 2005 18:29:38 -0800 -# Received: (from ellswort@localhost) -# by ece03.nas.nasa.gov (8.12.11/8.12.11/Submit) id jBF2TcQC022307; Wed, -# 14 Dec 2005 18:29:38 -0800 -# Date: Wed, 14 Dec 2005 18:29:38 -0800 -# From: David Ellsworth <ellswort@nas.nasa.gov> -# Subject: gawk number to string bug -# To: bug-gawk@gnu.org -# Cc: ellswort@nas.nasa.gov -# Message-id: <200512150229.jBF2TcQC022307@ece03.nas.nasa.gov> -# Original-recipient: rfc822;arobbins@012.net.il -# X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on skeeve.com -# X-Spam-Level: -# X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham -# version=2.63 -# -# -# I ran into a bug in how gawk converts numbers into strings. -# -# Running the program - BEGIN { print 9223372036854775808 } -# prints -# -9223372036854775808 -# on a 64-bit machine. On a 32-bit machine, the same program prints out -# 9.22337e+18 -# which is correct. -# -# Note that 9223372036854775808 == 2^63. Printing out other powers of 2 -# is OK. -# -# Version details: -# gawk version 3.1.5, freshly downloaded from gnu.org -# gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8) -# uname -a output: -# Linux pixie 2.6.12-gentoo-r10 #2 SMP Tue Nov 1 03:42:22 PST 2005 -# x86_64 Dual Core AMD Opteron(tm) Processor 275 AuthenticAMD GNU/Linux -# -# (the 32-bit example used gawk version 3.1.3) -# -# - David -# -# -# ##################################################################################### -# This Mail Was Scanned by 012.net AntiVirus Service4- Powered by TrendMicro Interscan -# diff --git a/test/ovrflow1.ok b/test/ovrflow1.ok deleted file mode 100644 index b0898f38..00000000 --- a/test/ovrflow1.ok +++ /dev/null @@ -1 +0,0 @@ -9223372036854775808 diff --git a/test/paramres.awk b/test/paramres.awk new file mode 100644 index 00000000..e2f18927 --- /dev/null +++ b/test/paramres.awk @@ -0,0 +1,6 @@ +BEGIN { foo() } + +function foo(a, FS, q) +{ + print "a =", a +} diff --git a/test/paramres.ok b/test/paramres.ok new file mode 100644 index 00000000..6c3d00a3 --- /dev/null +++ b/test/paramres.ok @@ -0,0 +1,2 @@ +gawk: paramres.awk:7: fatal: function `foo': can't use special variable `FS' as a function parameter +EXIT CODE: 2 diff --git a/test/printfbad2.awk b/test/printfbad2.awk new file mode 100644 index 00000000..d3bb3685 --- /dev/null +++ b/test/printfbad2.awk @@ -0,0 +1,2 @@ +BEGIN { FS = "a" } +{ printf ($2 "\n") } diff --git a/test/printfbad2.in b/test/printfbad2.in new file mode 100644 index 00000000..1faae6d8 --- /dev/null +++ b/test/printfbad2.in @@ -0,0 +1 @@ +a%28b%29%c diff --git a/test/printfbad2.ok b/test/printfbad2.ok new file mode 100644 index 00000000..67d16608 --- /dev/null +++ b/test/printfbad2.ok @@ -0,0 +1,3 @@ +gawk: printfbad2.awk:2: (FILENAME=printfbad2.in FNR=1) warning: ignoring unknown format specifier character `b': no argument converted +gawk: printfbad2.awk:2: (FILENAME=printfbad2.in FNR=1) warning: field width is ignored for `%%' specifier +%28b%c diff --git a/test/uparrfs.awk b/test/uparrfs.awk new file mode 100644 index 00000000..85905240 --- /dev/null +++ b/test/uparrfs.awk @@ -0,0 +1,8 @@ +BEGIN { + FS = "(^x+)|( +)" +} + +{ + for (i = 1; i <= NF; i++) + printf "-->%s<--\n", $i +} diff --git a/test/uparrfs.in b/test/uparrfs.in new file mode 100644 index 00000000..8e6b5c0d --- /dev/null +++ b/test/uparrfs.in @@ -0,0 +1 @@ +xxAA xxBxx C diff --git a/test/uparrfs.ok b/test/uparrfs.ok new file mode 100644 index 00000000..944ba9aa --- /dev/null +++ b/test/uparrfs.ok @@ -0,0 +1,4 @@ +--><-- +-->AA<-- +-->xxBxx<-- +-->C<-- |