diff options
Diffstat (limited to 'test')
38 files changed, 691 insertions, 71 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 88bcbb79..16b03278 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,93 @@ +Mon Aug 2 12:18:15 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Release 3.1.4: Release tar file made. + +Wed Jul 14 16:04:46 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (rstest6): new test. + * rstest6.awk, rstest6.in, rstest6.ok: new files. + +Tue Jul 13 10:53:32 2004 Arnold D. Robbins <arnold@skeeve.com> + + * strftlng: Use `$(CMP) ... >/dev/null 2>&1' instead of `-s' + for OS/2 and other systems that use `CMP = diff -a'. + +Mon Jun 14 18:44:39 2004 Pat Rankin <rankin@pactechdata.com> + + * longwrds.awk: allow caller the means to override SORT command. + +Tue Jun 8 14:12:52 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (fordel, printfbad1): new tests. + * fordel.awk, fordel.ok: new files. + * printfbad1.awk, printfbad1.ok: new files. + +Mon Apr 19 20:29:52 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (manglprm): new test. + * manglprm.awk, manglprm.in, manglprm.ok: new files. + +Mon Feb 23 18:39:24 2004 Arnold D. Robbins <arnold@skeeve.com> + + * inftest.awk: Add loop limit per Nelson H.F. Beebe. + * Makefile.am (strftime): Use LC_ALL=C for `date' invocation. + +Thu Feb 12 02:08:15 2004 Stepan Kasal <kasal@ucw.cz> + + * Makefile.am (diffout): Use $(srcdir), when we are not building + in the source tree. + +Wed Feb 11 10:23:39 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (strcat1): new test. + * strcat1.awk, strcat1.ok: new files. + +Fri Feb 6 12:09:55 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (CLEANFILES): Added. + +Thu Feb 5 15:34:14 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (exitval1): new test. + * exitval1.awk, exitval1.ok: new files. + +Mon Feb 2 10:29:19 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (subamp): new test. + * subamp.awk, subamp.in, subamp.ok: new files. + + * subamp, ignrcas2, strftime: Set GAWK_LOCALE, not LC_ALL. + +Wed Jan 14 15:28:34 2004 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (backw): new test. + * backw.awk, backw.in, backw.ok: new files. + +Mon Dec 1 10:29:22 2003 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (concat3): new test. + * concat3.awk, concat3.ok: new files. + +Sun Nov 2 16:05:21 2003 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (concat2): new test. + * concat2.awk, concat2.ok: new files. + +Wed Oct 29 13:35:37 2003 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (subsepnm): new test. + * subsepnm.awk, subsepnm.ok: new files. + +Mon Sep 15 16:05:37 2003 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (ignrcas2): new test. + * ignrcas2.awk, ignrcas2.ok: new files. + +Tue Sep 9 16:03:34 2003 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (unterm): new test. + * unterm.awk, unterm.ok: new files. + Mon Jul 7 11:01:43 2003 Arnold D. Robbins <arnold@skeeve.com> * Release 3.1.3: Release tar file made. @@ -9,7 +99,7 @@ Fri Jul 4 11:12:07 2003 Arnold D. Robbins <arnold@skeeve.com> Thu Jun 26 15:44:33 2003 Arnold D. Robbins <arnold@skeeve.com> - * Makefile.am (match2, whiny): new test. + * Makefile.am (match2, whiny): new tests. * match2.awk, match2.ok: new files. * whiny.awk, whiny.ok: new files. diff --git a/test/Makefile.am b/test/Makefile.am index 0a4b68e3..db23d1f0 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,7 +1,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2003 the Free Software Foundation, Inc. +# Copyright (C) 1988-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -95,6 +95,9 @@ EXTRA_DIST = \ backgsub.awk \ backgsub.in \ backgsub.ok \ + backw.awk \ + backw.in \ + backw.ok \ badargs.ok \ childin.awk \ childin.in \ @@ -114,6 +117,10 @@ EXTRA_DIST = \ concat1.awk \ concat1.in \ concat1.ok \ + concat2.awk \ + concat2.ok \ + concat3.awk \ + concat3.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ @@ -125,10 +132,14 @@ EXTRA_DIST = \ delarprm.ok \ delarpm2.awk \ delarpm2.ok \ + delfunc.awk \ + delfunc.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ + exitval1.awk \ + exitval1.ok \ fflush.ok \ fflush.sh \ fieldwdth.awk \ @@ -160,6 +171,8 @@ EXTRA_DIST = \ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ + fordel.awk \ + fordel.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ @@ -237,6 +250,8 @@ EXTRA_DIST = \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ + ignrcas2.awk \ + ignrcas2.ok \ inftest.awk \ inftest.ok \ inputred.awk \ @@ -260,6 +275,9 @@ EXTRA_DIST = \ longwrds.awk \ longwrds.ok \ longwrds.in \ + manglprm.awk \ + manglprm.in \ + manglprm.ok \ manyfiles.awk \ manyfiles.ok \ match1.awk \ @@ -380,6 +398,8 @@ EXTRA_DIST = \ printf0.ok \ printf1.awk \ printf1.ok \ + printfbad1.awk \ + printfbad1.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -442,6 +462,9 @@ EXTRA_DIST = \ rstest4.ok \ rstest5.awk \ rstest5.ok \ + rstest6.awk \ + rstest6.in \ + rstest6.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ @@ -473,6 +496,8 @@ EXTRA_DIST = \ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ + strcat1.awk \ + strcat1.ok \ strtod.awk \ strtod.in \ strtod.ok \ @@ -481,6 +506,11 @@ EXTRA_DIST = \ strftime.awk \ strftlng.awk \ strftlng.ok \ + subamp.awk \ + subamp.in \ + subamp.ok \ + subsepnm.awk \ + subsepnm.ok \ subslash.awk \ subslash.ok \ substr.awk \ @@ -505,6 +535,8 @@ EXTRA_DIST = \ uninit4.ok \ uninitialized.awk \ uninitialized.ok \ + unterm.awk \ + unterm.ok \ whiny.awk \ whiny.in \ whiny.ok \ @@ -513,18 +545,21 @@ EXTRA_DIST = \ zeroflag.awk \ zeroflag.ok +# Get rid of core files when cleaning +CLEANFILES = core core.* + # 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 convfmt datanonl defref \ - delarprm delarpm2 dynlj eofsplit fldchg fldchgnf fmttest fnamedat \ + clsflnam compare compare2 concat1 concat2 concat3 convfmt datanonl defref \ + delarprm delarpm2 delfunc dynlj eofsplit exitval1 fldchg fldchgnf fmttest fnamedat \ fnarray fnarray2 fnarydel fnaryscl fnasgnm fnmisc fnparydl \ - forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ + fordel forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ gsubtst2 gsubtst3 gsubtst4 gsubtst5 hsprint inputred intest \ - intprec leaddig leadnl litoct longsub longwrds math membug1 \ + intprec leaddig leadnl litoct longsub longwrds manglprm math membug1 \ messages minusstr mmap8k nasty nasty2 negexp nested nfldstr \ nfneg nfset nlfldsep nlinstr nlstrina noeffect nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ @@ -534,15 +569,15 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 \ reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 \ rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ - strtod subslash substr swaplns synerr1 tradanch tweakfld uninit2 \ - uninit3 uninit4 uninitialized zeroe0 zeroflag + strcat1 strtod subamp subsepnm subslash substr swaplns synerr1 tradanch \ + tweakfld uninit2 uninit3 uninit4 uninitialized unterm zeroe0 zeroflag UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng -GAWK_EXT_TESTS = argtest asort asorti badargs clos1way fieldwdth fsfwfs \ - gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase lint \ - match1 match2 manyfiles nondec posix procinfs regx8bit rebuf reint \ - shadow sort1 strtonum strftime whiny +GAWK_EXT_TESTS = argtest asort asorti backw badargs clos1way fieldwdth fsfwfs \ + gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase \ + ignrcas2 lint match1 match2 manyfiles nondec posix procinfs \ + printfbad1 regx8bit rebuf reint rstest6 shadow sort1 strtonum strftime whiny EXTRA_TESTS = regtest inftest @@ -559,6 +594,9 @@ AWKPROG = ../gawk$(EXEEXT) # This business forces the locale to be C for running the tests, # unless we override it to something else for testing. +# +# This can also be done in individual tests where we wish to +# check things specifically not in the C locale. AWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(AWKPROG) # Message stuff is to make it a little easier to follow. @@ -701,9 +739,9 @@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ - @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ + @GAWK_LOCALE=C; export GAWK_LOCALE; \ TZ=GMT0; export TZ; \ - date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk + (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @@ -742,7 +780,7 @@ pid:: strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ - @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ + @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ @@ -854,6 +892,25 @@ whiny:: @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +ignrcas2:: + @echo $@ + @GAWK_LOCALE=en_US ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +subamp:: + @echo $@ + @GAWK_LOCALE=en_US.UTF-8 ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +# This test makes sure gawk exits with a zero code. +# Thus, unconditionally generate the exit code. +exitval1:: + @echo $@ + @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # Targets generated for other tests: include Maketests @@ -876,7 +933,7 @@ diffout: for i in _* ; \ do \ echo ============== $$i ============= ; \ - diff -c $${i#_}.ok $$i ; \ + diff -c $(srcdir)/$${i#_}.ok $$i ; \ done | more # This target is for testing with electric fence. diff --git a/test/Makefile.in b/test/Makefile.in index 0c918524..5619fdc9 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.7.5 from Makefile.am. +# Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 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 +17,7 @@ # # test/Makefile.am --- automake input file for gawk # -# Copyright (C) 1988-2003 the Free Software Foundation, Inc. +# Copyright (C) 1988-2004 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -36,7 +36,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -44,7 +43,6 @@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 @@ -59,6 +57,35 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/Maketests ChangeLog +subdir = test +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes-pri.m4 \ + $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.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/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/strtod.m4 $(top_srcdir)/m4/uintmax_t.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.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 = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ @@ -70,6 +97,9 @@ AUTOMAKE = @AUTOMAKE@ # This business forces the locale to be C for running the tests, # unless we override it to something else for testing. +# +# This can also be done in individual tests where we wish to +# check things specifically not in the C locale. AWK = LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} $(AWKPROG) BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ @@ -90,6 +120,10 @@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ +HAVE_ASPRINTF = @HAVE_ASPRINTF@ +HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ +HAVE_SNPRINTF = @HAVE_SNPRINTF@ +HAVE_WPRINTF = @HAVE_WPRINTF@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -160,6 +194,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ @@ -167,7 +202,6 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ - EXTRA_DIST = \ reg \ lib \ @@ -240,6 +274,9 @@ EXTRA_DIST = \ backgsub.awk \ backgsub.in \ backgsub.ok \ + backw.awk \ + backw.in \ + backw.ok \ badargs.ok \ childin.awk \ childin.in \ @@ -259,6 +296,10 @@ EXTRA_DIST = \ concat1.awk \ concat1.in \ concat1.ok \ + concat2.awk \ + concat2.ok \ + concat3.awk \ + concat3.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ @@ -270,10 +311,14 @@ EXTRA_DIST = \ delarprm.ok \ delarpm2.awk \ delarpm2.ok \ + delfunc.awk \ + delfunc.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ + exitval1.awk \ + exitval1.ok \ fflush.ok \ fflush.sh \ fieldwdth.awk \ @@ -305,6 +350,8 @@ EXTRA_DIST = \ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ + fordel.awk \ + fordel.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ @@ -382,6 +429,8 @@ EXTRA_DIST = \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ + ignrcas2.awk \ + ignrcas2.ok \ inftest.awk \ inftest.ok \ inputred.awk \ @@ -405,6 +454,9 @@ EXTRA_DIST = \ longwrds.awk \ longwrds.ok \ longwrds.in \ + manglprm.awk \ + manglprm.in \ + manglprm.ok \ manyfiles.awk \ manyfiles.ok \ match1.awk \ @@ -525,6 +577,8 @@ EXTRA_DIST = \ printf0.ok \ printf1.awk \ printf1.ok \ + printfbad1.awk \ + printfbad1.ok \ printfloat.awk \ printlang.awk \ prmarscl.awk \ @@ -587,6 +641,9 @@ EXTRA_DIST = \ rstest4.ok \ rstest5.awk \ rstest5.ok \ + rstest6.awk \ + rstest6.in \ + rstest6.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ @@ -618,6 +675,8 @@ EXTRA_DIST = \ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ + strcat1.awk \ + strcat1.ok \ strtod.awk \ strtod.in \ strtod.ok \ @@ -626,6 +685,11 @@ EXTRA_DIST = \ strftime.awk \ strftlng.awk \ strftlng.ok \ + subamp.awk \ + subamp.in \ + subamp.ok \ + subsepnm.awk \ + subsepnm.ok \ subslash.awk \ subslash.ok \ substr.awk \ @@ -650,6 +714,8 @@ EXTRA_DIST = \ uninit4.ok \ uninitialized.awk \ uninitialized.ok \ + unterm.awk \ + unterm.ok \ whiny.awk \ whiny.in \ whiny.ok \ @@ -659,18 +725,21 @@ EXTRA_DIST = \ zeroflag.ok +# Get rid of core files when cleaning +CLEANFILES = core core.* + # 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 convfmt datanonl defref \ - delarprm delarpm2 dynlj eofsplit fldchg fldchgnf fmttest fnamedat \ + clsflnam compare compare2 concat1 concat2 concat3 convfmt datanonl defref \ + delarprm delarpm2 delfunc dynlj eofsplit exitval1 fldchg fldchgnf fmttest fnamedat \ fnarray fnarray2 fnarydel fnaryscl fnasgnm fnmisc fnparydl \ - forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ + fordel forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ gsubtst2 gsubtst3 gsubtst4 gsubtst5 hsprint inputred intest \ - intprec leaddig leadnl litoct longsub longwrds math membug1 \ + intprec leaddig leadnl litoct longsub longwrds manglprm math membug1 \ messages minusstr mmap8k nasty nasty2 negexp nested nfldstr \ nfneg nfset nlfldsep nlinstr nlstrina noeffect nofmtch noloop1 \ noloop2 nonl noparms nors nulrsend numindex numsubstr octsub ofmt \ @@ -680,20 +749,16 @@ BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 \ reindops reparse resplit rs rsnul1nl rsnulbig rsnulbig2 rstest1 \ rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ - strtod subslash substr swaplns synerr1 tradanch tweakfld uninit2 \ - uninit3 uninit4 uninitialized zeroe0 zeroflag - + strcat1 strtod subamp subsepnm subslash substr swaplns synerr1 tradanch \ + tweakfld uninit2 uninit3 uninit4 uninitialized unterm zeroe0 zeroflag UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng - -GAWK_EXT_TESTS = argtest asort asorti badargs clos1way fieldwdth fsfwfs \ - gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase lint \ - match1 match2 manyfiles nondec posix procinfs regx8bit rebuf reint \ - shadow sort1 strtonum strftime whiny - +GAWK_EXT_TESTS = argtest asort asorti backw badargs clos1way fieldwdth fsfwfs \ + gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase \ + ignrcas2 lint match1 match2 manyfiles nondec posix procinfs \ + printfbad1 regx8bit rebuf reint rstest6 shadow sort1 strtonum strftime whiny EXTRA_TESTS = regtest inftest - INET_TESTS = inetechu inetecht inetdayu inetdayt # List of the tests which should be run with --lint option: @@ -701,25 +766,40 @@ NEED_LINT = defref noeffect nofmtch shadow uninit2 uninit3 uninit4 uninitialized # List of the files that appear in manual tests or are for reserve testing: GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk switch2.awk - CMP = cmp AWKPROG = ../gawk$(EXEEXT) -subdir = test -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DIST_COMMON = README $(srcdir)/Maketests ChangeLog Makefile.am \ - Makefile.in all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(srcdir)/Maketests $(top_srcdir)/configure.ac $(ACLOCAL_M4) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/Maketests $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(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 uninstall-info-am: tags: TAGS TAGS: @@ -727,10 +807,6 @@ TAGS: ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -744,7 +820,7 @@ distdir: $(DISTFILES) dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ @@ -762,7 +838,6 @@ distdir: $(DISTFILES) check-am: all-am check: check-am all-am: Makefile - installdirs: install: install-am install-exec: install-exec-am @@ -775,31 +850,32 @@ install-am: all-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - INSTALL_STRIP_FLAG=-s \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f $(CONFIG_CLEAN_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: clean-am - clean-am: clean-generic mostlyclean-am distclean: distclean-am - + -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: +html: html-am + info: info-am info-am: @@ -815,7 +891,7 @@ install-man: installcheck-am: maintainer-clean: maintainer-clean-am - + -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am @@ -833,8 +909,8 @@ ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ @@ -981,9 +1057,9 @@ strftime:: @echo This test could fail on slow machines or on a minute boundary, @echo so if it does, double check the actual results: @echo $@ - @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ + @GAWK_LOCALE=C; export GAWK_LOCALE; \ TZ=GMT0; export TZ; \ - date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk + (LC_ALL=C date) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @@ -1022,7 +1098,7 @@ pid:: strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ - @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ + @if $(CMP) $(srcdir)/strftlng.ok _$@ >/dev/null 2>&1 ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ @@ -1133,6 +1209,25 @@ whiny:: @echo $@ @WHINY_USERS=1 $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +ignrcas2:: + @echo $@ + @GAWK_LOCALE=en_US ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +subamp:: + @echo $@ + @GAWK_LOCALE=en_US.UTF-8 ; export GAWK_LOCALE ; \ + $(AWK) -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +# This test makes sure gawk exits with a zero code. +# Thus, unconditionally generate the exit code. +exitval1:: + @echo $@ + @$(AWK) -f $(srcdir)/exitval1.awk >_$@ 2>&1; echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -1275,6 +1370,16 @@ concat1: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +concat2: + @echo concat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +concat3: + @echo concat3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1300,6 +1405,11 @@ delarpm2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delfunc: + @echo delfunc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + dynlj: @echo dynlj @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1365,6 +1475,11 @@ 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: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1480,6 +1595,11 @@ longwrds: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +manglprm: + @echo manglprm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1810,11 +1930,21 @@ 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 _$@ +subsepnm: + @echo subsepnm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1855,6 +1985,11 @@ uninitialized: @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +unterm: + @echo unterm + @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: $$? >>_$@ @@ -1880,6 +2015,11 @@ 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: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + clos1way: @echo clos1way @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1965,6 +2105,11 @@ 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 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1975,6 +2120,11 @@ rebuf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 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: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2013,7 +2163,7 @@ diffout: for i in _* ; \ do \ echo ============== $$i ============= ; \ - diff -c $${i#_}.ok $$i ; \ + diff -c $(srcdir)/$${i#_}.ok $$i ; \ done | more # This target is for testing with electric fence. diff --git a/test/Maketests b/test/Maketests index 27108d6d..2a0100b0 100644 --- a/test/Maketests +++ b/test/Maketests @@ -140,6 +140,16 @@ concat1: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +concat2: + @echo concat2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +concat3: + @echo concat3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -165,6 +175,11 @@ delarpm2: @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +delfunc: + @echo delfunc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + dynlj: @echo dynlj @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -230,6 +245,11 @@ 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: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -345,6 +365,11 @@ longwrds: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +manglprm: + @echo manglprm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -675,11 +700,21 @@ 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 _$@ +subsepnm: + @echo subsepnm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -720,6 +755,11 @@ uninitialized: @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +unterm: + @echo unterm + @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: $$? >>_$@ @@ -745,6 +785,11 @@ 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: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + clos1way: @echo clos1way @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -830,6 +875,11 @@ 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 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -840,6 +890,11 @@ rebuf: @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 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: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/backw.awk b/test/backw.awk new file mode 100644 index 00000000..078a5d89 --- /dev/null +++ b/test/backw.awk @@ -0,0 +1 @@ +/\w+/ diff --git a/test/backw.in b/test/backw.in new file mode 100644 index 00000000..ec09f608 --- /dev/null +++ b/test/backw.in @@ -0,0 +1,3 @@ +123 +abc +456 diff --git a/test/backw.ok b/test/backw.ok new file mode 100644 index 00000000..ec09f608 --- /dev/null +++ b/test/backw.ok @@ -0,0 +1,3 @@ +123 +abc +456 diff --git a/test/concat2.awk b/test/concat2.awk new file mode 100644 index 00000000..a94b29b5 --- /dev/null +++ b/test/concat2.awk @@ -0,0 +1,8 @@ +function f(s, x) { + x = 1 + s = 3 + s = s x + print s +} + +BEGIN { for (i = 1; i <=12; i++) f() } diff --git a/test/concat2.ok b/test/concat2.ok new file mode 100644 index 00000000..b7b86e5c --- /dev/null +++ b/test/concat2.ok @@ -0,0 +1,12 @@ +31 +31 +31 +31 +31 +31 +31 +31 +31 +31 +31 +31 diff --git a/test/concat3.awk b/test/concat3.awk new file mode 100644 index 00000000..554c9a90 --- /dev/null +++ b/test/concat3.awk @@ -0,0 +1 @@ +BEGIN { a; a = a (b "c"); print a; print b } diff --git a/test/concat3.ok b/test/concat3.ok new file mode 100644 index 00000000..88023312 --- /dev/null +++ b/test/concat3.ok @@ -0,0 +1,2 @@ +c + diff --git a/test/delfunc.awk b/test/delfunc.awk new file mode 100644 index 00000000..365a76ba --- /dev/null +++ b/test/delfunc.awk @@ -0,0 +1,7 @@ +# from Stepan Kasal, 9 July 2003 +function f() +{ + delete f +} + +BEGIN { f() } diff --git a/test/delfunc.ok b/test/delfunc.ok new file mode 100644 index 00000000..d12f0bc9 --- /dev/null +++ b/test/delfunc.ok @@ -0,0 +1,2 @@ +gawk: delfunc.awk:4: fatal: attempt to use function `f' as an array +EXIT CODE: 2 diff --git a/test/exitval1.awk b/test/exitval1.awk new file mode 100644 index 00000000..550200d2 --- /dev/null +++ b/test/exitval1.awk @@ -0,0 +1,3 @@ +# This should exit 0, even though child exits 1 +BEGIN { "exit 1" | getline junk ; exit 12 } +END { exit 0 } diff --git a/test/exitval1.ok b/test/exitval1.ok new file mode 100644 index 00000000..eca5994b --- /dev/null +++ b/test/exitval1.ok @@ -0,0 +1 @@ +EXIT CODE: 0 diff --git a/test/fordel.awk b/test/fordel.awk new file mode 100644 index 00000000..58ede20f --- /dev/null +++ b/test/fordel.awk @@ -0,0 +1,65 @@ +#Date: Mon, 7 Jun 2004 10:40:28 -0500 +#From: mary1john8@earthlink.net +#To: arnold@skeeve.com +#Subject: gawk internal errors +#Message-ID: <20040607154028.GA2457@apollo> +# +#Hello, +# +# gawk-3.1.3i internal errors: +# +#[1] +# +#$> ./gawk 'BEGIN { for (i in a) delete a; }' +BEGIN { for (i in a) delete a; } +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- awkgram.y.orig 2004-06-07 09:42:14.000000000 -0500 +#+++ awkgram.y 2004-06-07 09:45:58.000000000 -0500 +#@@ -387,7 +387,7 @@ +# * Check that the body is a `delete a[i]' statement, +# * and that both the loop var and array names match. +# */ +#- if ($8 != NULL && $8->type == Node_K_delete) { +#+ if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { +# NODE *arr, *sub; +# +# assert($8->rnode->type == Node_expression_list); +#------------------------------------------------------------------ +# +# +#[2] +# +#$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }' +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- builtin.c.orig 2004-06-07 10:04:20.000000000 -0500 +#+++ builtin.c 2004-06-07 10:06:08.000000000 -0500 +#@@ -780,7 +780,10 @@ +# s1++; +# n0--; +# } +#- +#+ if (val >= num_args) { +#+ toofew = TRUE; +#+ break; +#+ } +# arg = the_args[val]; +# } else { +# parse_next_arg(); +#------------------------------------------------------------------ +# +# +# Finally, a test for the rewritten get_src_buf(): +# +#$> AWKBUFSIZE=2 make check +# +#I get 3 failed tests. Not sure this is of any interest. +# +# +#Thanks, +#John diff --git a/test/fordel.ok b/test/fordel.ok new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/fordel.ok diff --git a/test/ignrcas2.awk b/test/ignrcas2.awk new file mode 100644 index 00000000..b7ef0cdf --- /dev/null +++ b/test/ignrcas2.awk @@ -0,0 +1,13 @@ +# Based on test program submitted by: +# Date: Sun, 7 Sep 2003 23:11:51 +0200 +# From: Michael Mauch <michael.mauch@gmx.de> +# To: bug-gawk@gnu.org +# Subject: Internal error in gawk-3.1.3 with character class + +BEGIN { + IGNORECASE = 1 + if ("a" ~ /[[:alnum:]]/) + print "OK" + else + print "NOT OK" +} diff --git a/test/ignrcas2.ok b/test/ignrcas2.ok new file mode 100644 index 00000000..d86bac9d --- /dev/null +++ b/test/ignrcas2.ok @@ -0,0 +1 @@ +OK diff --git a/test/inftest.awk b/test/inftest.awk index f24bd7e3..a8226178 100644 --- a/test/inftest.awk +++ b/test/inftest.awk @@ -1,5 +1,8 @@ BEGIN { + k = 0 x = 100 - do { y = x ; x *= 1000; print x,y } while ( y < x ) + # Added k limit test after finding some systems that didn't terminate + # the loop correctly, sigh... + do { k++; y = x ; x *= 1000; print x,y } while ( y < x && k < 1700) print "loop terminated" } diff --git a/test/longwrds.awk b/test/longwrds.awk index d496ac79..d4b4d92d 100644 --- a/test/longwrds.awk +++ b/test/longwrds.awk @@ -1,4 +1,10 @@ # From Gawk Manual modified by bug fix and removal of punctuation + +# Invoker can customize sort command if necessary. +BEGIN { + if (!SORT) SORT = "LC_ALL=C sort" +} + # Record every word which is used at least once { for (i = 1; i <= NF; i++) { @@ -14,8 +20,8 @@ END { for (x in used) if (length(x) > 10) { ++num_long_words - print x | "LC_ALL=C sort" + print x | SORT } - print(num_long_words, "long words") | "LC_ALL=C sort" - close("LC_ALL=C sort") + print(num_long_words, "long words") | SORT + close(SORT) } diff --git a/test/manglprm.awk b/test/manglprm.awk new file mode 100644 index 00000000..3a4306cc --- /dev/null +++ b/test/manglprm.awk @@ -0,0 +1,41 @@ +# From beebe@sunshine.math.utah.edu Thu Jul 10 00:36:16 2003 +# Date: Wed, 9 Jul 2003 06:42:54 -0600 (MDT) +# From: "Nelson H. F. Beebe" <beebe@math.utah.edu> +# To: "Arnold Robbins" <arnold@skeeve.com> +# Cc: beebe@math.utah.edu +# X-US-Mail: "Center for Scientific Computing, Department of Mathematics, 110 +# LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT +# 84112-0090, USA" +# X-Telephone: +1 801 581 5254 +# X-FAX: +1 801 585 1640, +1 801 581 4148 +# X-URL: http://www.math.utah.edu/~beebe +# Subject: gawk-3.1.3 (and earlier): reproducible core dump +# X-SpamBouncer: 1.4 (10/07/01) +# X-SBClass: OK +# +# I have a reproducible core dump in gawk-3.1.3, and recent gawk +# versions. +# +# Consider the following test program, reduced from a much larger one: +# +# % cat gawk-dump.awk + + { process($0) } + + function out_debug(s) + { + print s + } + + function process(s, n,parts) + { + out_debug("Buffer = [" protect(Buffer) "]") + Buffer = Buffer s + n = split(Buffer,parts,"\n") + } + + function protect(s) + { + gsub("\n", "\\n", s) + return (s) + } diff --git a/test/manglprm.in b/test/manglprm.in new file mode 100644 index 00000000..73709ba6 --- /dev/null +++ b/test/manglprm.in @@ -0,0 +1 @@ +Testing diff --git a/test/manglprm.ok b/test/manglprm.ok new file mode 100644 index 00000000..b13c4566 --- /dev/null +++ b/test/manglprm.ok @@ -0,0 +1 @@ +Buffer = [] diff --git a/test/printfbad1.awk b/test/printfbad1.awk new file mode 100644 index 00000000..1b478df9 --- /dev/null +++ b/test/printfbad1.awk @@ -0,0 +1,65 @@ +#Date: Mon, 7 Jun 2004 10:40:28 -0500 +#From: mary1john8@earthlink.net +#To: arnold@skeeve.com +#Subject: gawk internal errors +#Message-ID: <20040607154028.GA2457@apollo> +# +#Hello, +# +# gawk-3.1.3i internal errors: +# +#[1] +# +#$> ./gawk 'BEGIN { for (i in a) delete a; }' +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- awkgram.y.orig 2004-06-07 09:42:14.000000000 -0500 +#+++ awkgram.y 2004-06-07 09:45:58.000000000 -0500 +#@@ -387,7 +387,7 @@ +# * Check that the body is a `delete a[i]' statement, +# * and that both the loop var and array names match. +# */ +#- if ($8 != NULL && $8->type == Node_K_delete) { +#+ if ($8 != NULL && $8->type == Node_K_delete && $8->rnode != NULL) { +# NODE *arr, *sub; +# +# assert($8->rnode->type == Node_expression_list); +#------------------------------------------------------------------ +# +# +#[2] +# +#$> ./gawk 'BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); }' +BEGIN { printf("%3$*10$.*1$s\n", 20, 10, "hello"); } +#gawk: fatal error: internal error +#Aborted +# +#------------------------------------------------------------------ +#--- builtin.c.orig 2004-06-07 10:04:20.000000000 -0500 +#+++ builtin.c 2004-06-07 10:06:08.000000000 -0500 +#@@ -780,7 +780,10 @@ +# s1++; +# n0--; +# } +#- +#+ if (val >= num_args) { +#+ toofew = TRUE; +#+ break; +#+ } +# arg = the_args[val]; +# } else { +# parse_next_arg(); +#------------------------------------------------------------------ +# +# +# Finally, a test for the rewritten get_src_buf(): +# +#$> AWKBUFSIZE=2 make check +# +#I get 3 failed tests. Not sure this is of any interest. +# +# +#Thanks, +#John diff --git a/test/printfbad1.ok b/test/printfbad1.ok new file mode 100644 index 00000000..d02140a6 --- /dev/null +++ b/test/printfbad1.ok @@ -0,0 +1,5 @@ +gawk: printfbad1.awk:35: fatal: not enough arguments to satisfy format string + `%3$*10$.*1$s +' + ^ ran out for this one +EXIT CODE: 2 diff --git a/test/rstest6.awk b/test/rstest6.awk new file mode 100644 index 00000000..3481c0a3 --- /dev/null +++ b/test/rstest6.awk @@ -0,0 +1,6 @@ +# Wed Jul 14 16:02:45 IDT 2004 +# Test case from John Haque mary1john8@earthlink.net + +BEGIN { RS = "XYZ" } + +{ print } diff --git a/test/rstest6.in b/test/rstest6.in new file mode 100644 index 00000000..a6bddc4a --- /dev/null +++ b/test/rstest6.in @@ -0,0 +1 @@ +ABCD
\ No newline at end of file diff --git a/test/rstest6.ok b/test/rstest6.ok new file mode 100644 index 00000000..9ed46142 --- /dev/null +++ b/test/rstest6.ok @@ -0,0 +1 @@ +ABCD diff --git a/test/strcat1.awk b/test/strcat1.awk new file mode 100644 index 00000000..0d28017c --- /dev/null +++ b/test/strcat1.awk @@ -0,0 +1,6 @@ + +function f1(b) { b = b "c"; print f(b); } + +function f(a) { a = a "b"; return a; } + +BEGIN { A = "a"; f1(A); } diff --git a/test/strcat1.ok b/test/strcat1.ok new file mode 100644 index 00000000..66a2f4b4 --- /dev/null +++ b/test/strcat1.ok @@ -0,0 +1 @@ +acb diff --git a/test/subamp.awk b/test/subamp.awk new file mode 100644 index 00000000..2638e6ea --- /dev/null +++ b/test/subamp.awk @@ -0,0 +1 @@ +{ sub(/[a-z]/, "&") ; print } diff --git a/test/subamp.in b/test/subamp.in new file mode 100644 index 00000000..72943a16 --- /dev/null +++ b/test/subamp.in @@ -0,0 +1 @@ +aaa diff --git a/test/subamp.ok b/test/subamp.ok new file mode 100644 index 00000000..72943a16 --- /dev/null +++ b/test/subamp.ok @@ -0,0 +1 @@ +aaa diff --git a/test/subsepnm.awk b/test/subsepnm.awk new file mode 100644 index 00000000..976eef96 --- /dev/null +++ b/test/subsepnm.awk @@ -0,0 +1 @@ +BEGIN { SUBSEP = 10; a[1, 1] = 100 ; print a[1 SUBSEP 1] } diff --git a/test/subsepnm.ok b/test/subsepnm.ok new file mode 100644 index 00000000..29d6383b --- /dev/null +++ b/test/subsepnm.ok @@ -0,0 +1 @@ +100 diff --git a/test/unterm.awk b/test/unterm.awk new file mode 100644 index 00000000..c420c47b --- /dev/null +++ b/test/unterm.awk @@ -0,0 +1 @@ +BEGIN{x=".........................................................................................................................................................................................................................................................}
\ No newline at end of file diff --git a/test/unterm.ok b/test/unterm.ok new file mode 100644 index 00000000..a8e7e598 --- /dev/null +++ b/test/unterm.ok @@ -0,0 +1,3 @@ +gawk: unterm.awk:1: BEGIN{x=".........................................................................................................................................................................................................................................................} +gawk: unterm.awk:1: ^ unterminated string +EXIT CODE: 1 |