diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-04-21 15:04:14 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-04-21 15:04:14 +0300 |
commit | dfb4f3b18cc0490cf1db9dad021fce62a99443b5 (patch) | |
tree | 73521ae6691edc38c503a20725135a7a7ac95d93 | |
parent | 3ee06fa46236117ccb00fe4e832e7a7e4694f7f8 (diff) | |
parent | 847657fa4ec580658371d6fcaea547f7769fb569 (diff) | |
download | egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.tar.gz egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.tar.bz2 egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.zip |
Merge branch 'gawk-5.0-stable'
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r--[-rwxr-xr-x] | ChangeLog.1 | 0 | ||||
-rw-r--r-- | Checklist | 4 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | Makefile.in | 1 | ||||
-rw-r--r-- | awk.h | 1 | ||||
-rw-r--r-- | awkgram.c | 2 | ||||
-rw-r--r-- | awkgram.y | 2 | ||||
-rw-r--r-- | awklib/ChangeLog | 4 | ||||
-rw-r--r-- | awklib/Makefile.am | 3 | ||||
-rw-r--r-- | awklib/Makefile.in | 4 | ||||
-rw-r--r-- | command.c | 14 | ||||
-rw-r--r-- | command.y | 14 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/Makefile.am | 3 | ||||
-rw-r--r-- | doc/Makefile.in | 3 | ||||
-rw-r--r-- | doc/gawk.texi | 13 | ||||
-rw-r--r-- | doc/gawktexi.in | 13 | ||||
-rw-r--r-- | doc/it/ChangeLog | 4 | ||||
-rw-r--r-- | doc/it/gawktexi.in | 13 | ||||
-rw-r--r-- | extension/ChangeLog | 4 | ||||
-rw-r--r-- | extension/Makefile.am | 1 | ||||
-rw-r--r-- | extension/Makefile.in | 1 | ||||
-rw-r--r-- | field.c | 1 | ||||
-rw-r--r-- | main.c | 6 | ||||
-rw-r--r-- | msg.c | 9 | ||||
-rw-r--r-- | test/ChangeLog | 11 | ||||
-rw-r--r-- | test/Makefile.am | 12 | ||||
-rw-r--r-- | test/Makefile.in | 22 | ||||
-rw-r--r-- | test/Maketests | 10 | ||||
-rw-r--r-- | test/fscaret.awk | 8 | ||||
-rw-r--r-- | test/fscaret.in | 1 | ||||
-rw-r--r-- | test/fscaret.ok | 1 | ||||
-rw-r--r-- | test/synerr3.awk | 1 | ||||
-rw-r--r-- | test/synerr3.ok | 5 |
35 files changed, 179 insertions, 35 deletions
@@ -1,6 +1,23 @@ 2019-04-21 Arnold D. Robbins <arnold@skeeve.com> * POSIX.STD: Updated. + * field.c (get_field): If NF == -1, check parse high water to + set in_middle correctly. Thanks to <oguzismailuysal@gmail.com> + for the report. + +2019-04-18 Arnold D. Robbins <arnold@skeeve.com> + + * msg.c (msg): Add an undocumented feature. "Use the Source, Luke." + * Makefile.am (EXTRA_DIST): Add ChangeLog.1 to the list. Ooops. + * CheckList: Updated. + + Fix core dump reported by Steve Kemp <steve@steve.org.uk>: + + * awk.h (errcount): Declare. + * awkgram.y (errcount): No longer static. + * command.y (dbg_errcount): Renamed from errcount.j + * main.c (catchsig, catchsegv): If errcount > 0, just exit, + don't abort. 2019-04-12 Arnold D. Robbins <arnold@skeeve.com> diff --git a/ChangeLog.1 b/ChangeLog.1 index aa8226e7..aa8226e7 100755..100644 --- a/ChangeLog.1 +++ b/ChangeLog.1 @@ -1,4 +1,4 @@ -Thu Feb 28 21:19:43 IST 2019 +Thu Apr 18 20:01:43 IDT 2019 ============================ A checklist for making releases @@ -59,6 +59,8 @@ run the following command just before rolling a new release: Major releases: - Rotate the ChangeLog and NEWS files. +- When doing so, update any necessary Makefile.am files to + list the rotated ChangeLog file! ========== For Releasing ============ diff --git a/Makefile.am b/Makefile.am index d544b1cc..3b55ff3b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,7 @@ AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' # Makefile.am files EXTRA_DIST = \ ChangeLog.0 \ + ChangeLog.1 \ COPYING \ INSTALL \ NEWS \ diff --git a/Makefile.in b/Makefile.in index b8b0b441..61f37a2d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -467,6 +467,7 @@ AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' # Makefile.am files EXTRA_DIST = \ ChangeLog.0 \ + ChangeLog.1 \ COPYING \ INSTALL \ NEWS \ @@ -1116,6 +1116,7 @@ extern NODE *Null_field; extern NODE **fields_arr; extern int sourceline; extern char *source; +extern int errcount; extern int (*interpret)(INSTRUCTION *); /* interpreter routine */ extern NODE *(*make_number)(double); /* double instead of AWKNUM on purpose */ extern NODE *(*str2number)(NODE *); @@ -198,7 +198,7 @@ static int continue_allowed; /* kludge for continue */ static char *tokstart = NULL; static char *tok = NULL; static char *tokend; -static int errcount = 0; +int errcount = 0; extern char *source; extern int sourceline; @@ -154,7 +154,7 @@ static int continue_allowed; /* kludge for continue */ static char *tokstart = NULL; static char *tok = NULL; static char *tokend; -static int errcount = 0; +int errcount = 0; extern char *source; extern int sourceline; diff --git a/awklib/ChangeLog b/awklib/ChangeLog index 862c2b87..ef4f632c 100644 --- a/awklib/ChangeLog +++ b/awklib/ChangeLog @@ -1,3 +1,7 @@ +2019-04-18 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): Add ChangeLog.1 to the list. Ooops. + 2019-04-12 Arnold D. Robbins <arnold@skeeve.com> * ChangeLog.1: Rotated ChangeLog into this file. diff --git a/awklib/Makefile.am b/awklib/Makefile.am index adb607b3..20e9edba 100644 --- a/awklib/Makefile.am +++ b/awklib/Makefile.am @@ -23,7 +23,8 @@ ## process this file with automake to produce Makefile.in -EXTRA_DIST = ChangeLog ChangeLog.0 extract.awk eg $(srcdir)/stamp-eg +EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \ + extract.awk eg $(srcdir)/stamp-eg # With some locales, the script extract.awk fails. # So we fix the locale to some sensible value. diff --git a/awklib/Makefile.in b/awklib/Makefile.in index c198acc8..449a5bf7 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -327,7 +327,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = ChangeLog ChangeLog.0 extract.awk eg $(srcdir)/stamp-eg +EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \ + extract.awk eg $(srcdir)/stamp-eg + @TEST_CROSS_COMPILE_FALSE@AWKPROG = LC_ALL=C LANG=C "$(abs_top_builddir)/gawk$(EXEEXT)" # With some locales, the script extract.awk fails. # So we fix the locale to some sensible value. @@ -94,7 +94,7 @@ static bool want_nodeval = false; static int cmd_idx = -1; /* index of current command in cmd table */ static int repeat_idx = -1; /* index of last repeatable command in command table */ static CMDARG *arg_list = NULL; /* list of arguments */ -static long errcount = 0; +static long dbg_errcount = 0; static char *lexptr_begin = NULL; static bool in_commands = false; static int num_dim; @@ -1553,7 +1553,7 @@ yyreduce: case 5: #line 130 "command.y" /* yacc.c:1652 */ { - if (errcount == 0 && cmd_idx >= 0) { + if (dbg_errcount == 0 && cmd_idx >= 0) { Func_cmd cmdfunc; bool terminate = false; CMDARG *args; @@ -1621,7 +1621,7 @@ yyreduce: case 23: #line 219 "command.y" /* yacc.c:1652 */ { - if (errcount == 0) { + if (dbg_errcount == 0) { /* don't free arg_list; passed on to statement_list * non-terminal (empty rule action). See below. */ @@ -1788,7 +1788,7 @@ yyreduce: if (yyvsp[0] != NULL) num = yyvsp[0]->a_int; - if (errcount != 0) + if (dbg_errcount != 0) ; else if (in_commands) yyerror(_("Can't use command `commands' for breakpoint/watchpoint commands")); @@ -2774,7 +2774,7 @@ yyerror(const char *mesg, ...) vfprintf(out_fp, mesg, args); fprintf(out_fp, "\n"); va_end(args); - errcount++; + dbg_errcount++; repeat_idx = -1; } @@ -2796,9 +2796,9 @@ yylex(void) yylval = (CMDARG *) NULL; - if (errcount > 0 && lexptr_begin == NULL) { + if (dbg_errcount > 0 && lexptr_begin == NULL) { /* fake a new line */ - errcount = 0; + dbg_errcount = 0; return '\n'; } @@ -44,7 +44,7 @@ static bool want_nodeval = false; static int cmd_idx = -1; /* index of current command in cmd table */ static int repeat_idx = -1; /* index of last repeatable command in command table */ static CMDARG *arg_list = NULL; /* list of arguments */ -static long errcount = 0; +static long dbg_errcount = 0; static char *lexptr_begin = NULL; static bool in_commands = false; static int num_dim; @@ -128,7 +128,7 @@ line : nls | command nls { - if (errcount == 0 && cmd_idx >= 0) { + if (dbg_errcount == 0 && cmd_idx >= 0) { Func_cmd cmdfunc; bool terminate = false; CMDARG *args; @@ -217,7 +217,7 @@ set_want_nodeval eval_prologue : D_EVAL set_want_nodeval opt_param_list nls { - if (errcount == 0) { + if (dbg_errcount == 0) { /* don't free arg_list; passed on to statement_list * non-terminal (empty rule action). See below. */ @@ -335,7 +335,7 @@ command if ($2 != NULL) num = $2->a_int; - if (errcount != 0) + if (dbg_errcount != 0) ; else if (in_commands) yyerror(_("Can't use command `commands' for breakpoint/watchpoint commands")); @@ -1017,7 +1017,7 @@ yyerror(const char *mesg, ...) vfprintf(out_fp, mesg, args); fprintf(out_fp, "\n"); va_end(args); - errcount++; + dbg_errcount++; repeat_idx = -1; } @@ -1039,9 +1039,9 @@ yylex(void) yylval = (CMDARG *) NULL; - if (errcount > 0 && lexptr_begin == NULL) { + if (dbg_errcount > 0 && lexptr_begin == NULL) { /* fake a new line */ - errcount = 0; + dbg_errcount = 0; return '\n'; } diff --git a/doc/ChangeLog b/doc/ChangeLog index 3eb8e944..2af0aa5e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -8,6 +8,11 @@ separator for all values of FS, but that in reality it doesn't apply to regexps; this is a POSIX bug. +2019-04-18 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Undocumented): Note an undocumented feature. + * Makefile.am (EXTRA_DIST): Add ChangeLog.1 to the list. Ooops. + 2019-04-14 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Case-sensitivity): Document that single-byte diff --git a/doc/Makefile.am b/doc/Makefile.am index 1e5d86ac..24dd0405 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -28,7 +28,8 @@ info_TEXINFOS = gawk.texi gawkinet.texi gawkworkflow.texi man_MANS = gawk.1 -EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ +EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \ + README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ api-figure1.eps api-figure1.fig api-figure1.pdf \ api-figure1.png api-figure1.txt \ diff --git a/doc/Makefile.in b/doc/Makefile.in index 7fd6603d..9bce117d 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -357,7 +357,8 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = gawk.texi gawkinet.texi gawkworkflow.texi man_MANS = gawk.1 -EXTRA_DIST = ChangeLog ChangeLog.0 README.card ad.block setter.outline \ +EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \ + README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ api-figure1.eps api-figure1.fig api-figure1.pdf \ api-figure1.png api-figure1.txt \ diff --git a/doc/gawk.texi b/doc/gawk.texi index 973e0eb4..21670d57 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -5035,6 +5035,19 @@ returns a textual version of the flags for scalar variables, and the array back-end implementation type for arrays. This interface is subject to change and may not be stable. +When not in POSIX or compatibility mode, if you set @code{LINENO} to a +numeric value using the @option{-v} option, @command{gawk} adds that value +to the real line number for use in error messages. This is intended for +use within Bash shell scripts, such that the error message will reflect +the line number in the shell script, instead of in the @command{awk} +program. To demonstrate: + +@exmaple +$ @kbd{gawk -v LINENO=10 'BEGIN @{ print("hi" @}'} +@error{} gawk: cmd. line:11: BEGIN @{ print("hi" @} +@error{} gawk: cmd. line:11: ^ syntax error +@end example + @end ignore @node Invoking Summary diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 3548720b..e986d033 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4945,6 +4945,19 @@ returns a textual version of the flags for scalar variables, and the array back-end implementation type for arrays. This interface is subject to change and may not be stable. +When not in POSIX or compatibility mode, if you set @code{LINENO} to a +numeric value using the @option{-v} option, @command{gawk} adds that value +to the real line number for use in error messages. This is intended for +use within Bash shell scripts, such that the error message will reflect +the line number in the shell script, instead of in the @command{awk} +program. To demonstrate: + +@exmaple +$ @kbd{gawk -v LINENO=10 'BEGIN @{ print("hi" @}'} +@error{} gawk: cmd. line:11: BEGIN @{ print("hi" @} +@error{} gawk: cmd. line:11: ^ syntax error +@end example + @end ignore @node Invoking Summary diff --git a/doc/it/ChangeLog b/doc/it/ChangeLog index a384a80e..739d60d7 100644 --- a/doc/it/ChangeLog +++ b/doc/it/ChangeLog @@ -1,3 +1,7 @@ +2019-04-18 Antonio Giovanni Colombo <azc100@gmail.com> + + * gawktexi.in: Updated. + 2019-04-12 Arnold D. Robbins <arnold@skeeve.com> * 5.0.0: Release tar ball made. diff --git a/doc/it/gawktexi.in b/doc/it/gawktexi.in index b0ff86e6..2c7e5ebe 100644 --- a/doc/it/gawktexi.in +++ b/doc/it/gawktexi.in @@ -6711,15 +6711,14 @@ un programma insensibile a maiuscolo/minuscolo senza doverlo modificare. @c @cindex ISO 8859-1 @c @cindex ISO Latin-1 -In localizzazioni multibyte, -le equivalenze tra caratteri maiuscoli +In localizzazioni multibyte, le equivalenze tra caratteri maiuscoli e minuscoli sono controllate usando i valori in formato esteso dell'insieme di caratteri della localizzazione. -Per il resto, i caratteri sono controllati usando l'insieme di caratteri -ISO-8859-1 (ISO Latin-1). -Questo insieme di caratteri @`e un'estensione del tradizionale insieme con 128 -caratteri ASCII, che include anche molti caratteri adatti -per le lingue europee.@footnote{Se questo sembra oscuro, +Prima della @value{PVERSION} 5.0, i caratteri che usano un solo byte +erano confrontati usando l'insieme di caratteri ISO-8859-1 (ISO Latin-1). +Tuttavia, a partire dalla @value{PVERSION} 5.0, i caratteri che usano +un solo byte sono confrontati usando anche i valori dell'insieme di +caratteri della localizzazione.@footnote{Se questo sembra oscuro, non c'@`e ragione di preoccuparsi; significa solo che @command{gawk} fa la cosa giusta.} diff --git a/extension/ChangeLog b/extension/ChangeLog index 862c2b87..ef4f632c 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2019-04-18 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): Add ChangeLog.1 to the list. Ooops. + 2019-04-12 Arnold D. Robbins <arnold@skeeve.com> * ChangeLog.1: Rotated ChangeLog into this file. diff --git a/extension/Makefile.am b/extension/Makefile.am index 58650ca3..f8be8d2b 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -138,6 +138,7 @@ uninstall-recursive: uninstall-so EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 \ + ChangeLog.1 \ ext_custom.h \ fts.3 \ m4 \ diff --git a/extension/Makefile.in b/extension/Makefile.in index 8a904ba5..13d8ffd6 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -635,6 +635,7 @@ readdir_test_la_LIBADD = $(MY_LIBS) EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 \ + ChangeLog.1 \ ext_custom.h \ fts.3 \ m4 \ @@ -855,6 +855,7 @@ get_field(long requested, Func_ptr *assign) if (! field0_valid) { /* first, parse remainder of input record */ if (NF == -1) { + in_middle = (parse_high_water != 0); NF = (*parse_field)(UNLIMITED - 1, &parse_extent, fields_arr[0]->stlen - (parse_extent - fields_arr[0]->stptr), @@ -1262,6 +1262,9 @@ catchsig(int sig) || sig == SIGBUS #endif ) { + if (errcount > 0) // assume a syntax error corrupted our data structures + exit(EXIT_FATAL); + set_loc(__FILE__, __LINE__); msg(_("fatal error: internal error")); /* fatal won't abort() if not compiled for debugging */ @@ -1279,6 +1282,9 @@ catchsig(int sig) static int catchsegv(void *fault_address, int serious) { + if (errcount > 0) // assume a syntax error corrupted our data structures + exit(EXIT_FATAL); + set_loc(__FILE__, __LINE__); msg(_("fatal error: internal error: segfault")); fflush(NULL); @@ -46,10 +46,17 @@ err(bool isfatal, const char *s, const char *emsg, va_list argp) static bool first = true; static bool add_src_info = false; + static long lineno_val = 0; // Easter Egg if (first) { first = false; add_src_info = (getenv("GAWK_MSG_SRC") != NULL); + if (! do_traditional) { + NODE *n = lookup("LINENO"); + + if (n != NULL && n->type == Node_var) + lineno_val = get_number_d(n->var_value); + } } (void) fflush(output_fp); @@ -67,7 +74,7 @@ err(bool isfatal, const char *s, const char *emsg, va_list argp) else (void) fprintf(stderr, _("cmd. line:")); - (void) fprintf(stderr, "%d: ", sourceline); + (void) fprintf(stderr, "%d: ", sourceline + lineno_val); } #ifdef HAVE_MPFR diff --git a/test/ChangeLog b/test/ChangeLog index 862c2b87..726ac262 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,14 @@ +2019-04-21 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): New test: fscaret. + * fscaret.awk, fscaret.in, fscaret.ok: New files. + +2019-04-18 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): Add ChangeLog.1 to the list. Ooops. + (synerr3): New test. + * synerr3.awk, synerr3.ok: New files. + 2019-04-12 Arnold D. Robbins <arnold@skeeve.com> * ChangeLog.1: Rotated ChangeLog into this file. diff --git a/test/Makefile.am b/test/Makefile.am index 57d0444c..1ca9ba0c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -27,6 +27,7 @@ EXTRA_DIST = \ reg \ lib \ ChangeLog.0 \ + ChangeLog.1 \ Gentests \ Maketests \ README \ @@ -366,6 +367,9 @@ EXTRA_DIST = \ fsbs.awk \ fsbs.in \ fsbs.ok \ + fscaret.awk \ + fscaret.in \ + fscaret.ok \ fsfwfs.awk \ fsfwfs.in \ fsfwfs.ok \ @@ -1187,6 +1191,8 @@ EXTRA_DIST = \ synerr1.ok \ synerr2.awk \ synerr2.ok \ + synerr3.awk \ + synerr3.ok \ tailrecurse.awk \ tailrecurse.ok \ testext.ok \ @@ -1286,8 +1292,8 @@ BASIC_TESTS = \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ eofsplit eofsrc1 exit2 exitval1 exitval2 exitval3 \ fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray fnarray2 \ - fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln \ - fstabplus funsemnl funsmnam funstack \ + fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fscaret fsnul1 \ + fsrs fsspcoln fstabplus funsemnl funsmnam funstack \ getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 gsubtst7 \ gsubtst8 \ @@ -1310,7 +1316,7 @@ BASIC_TESTS = \ scalar sclforin sclifin setrec0 setrec1 \ sigpipe1 sortempty sortglos spacere splitargv splitarr \ splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \ - subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 \ + subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 synerr3 \ tailrecurse tradanch trailbs tweakfld \ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \ wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ diff --git a/test/Makefile.in b/test/Makefile.in index fea54584..5eb79abe 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -286,6 +286,7 @@ EXTRA_DIST = \ reg \ lib \ ChangeLog.0 \ + ChangeLog.1 \ Gentests \ Maketests \ README \ @@ -625,6 +626,9 @@ EXTRA_DIST = \ fsbs.awk \ fsbs.in \ fsbs.ok \ + fscaret.awk \ + fscaret.in \ + fscaret.ok \ fsfwfs.awk \ fsfwfs.in \ fsfwfs.ok \ @@ -1446,6 +1450,8 @@ EXTRA_DIST = \ synerr1.ok \ synerr2.awk \ synerr2.ok \ + synerr3.awk \ + synerr3.ok \ tailrecurse.awk \ tailrecurse.ok \ testext.ok \ @@ -1545,8 +1551,8 @@ BASIC_TESTS = \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ eofsplit eofsrc1 exit2 exitval1 exitval2 exitval3 \ fcall_exit fcall_exit2 fldchg fldchgnf fldterm fnamedat fnarray fnarray2 \ - fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln \ - fstabplus funsemnl funsmnam funstack \ + fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fscaret fsnul1 \ + fsrs fsspcoln fstabplus funsemnl funsmnam funstack \ getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \ gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 gsubtst7 \ gsubtst8 \ @@ -1569,7 +1575,7 @@ BASIC_TESTS = \ scalar sclforin sclifin setrec0 setrec1 \ sigpipe1 sortempty sortglos spacere splitargv splitarr \ splitdef splitvar splitwht status-close strcat1 strnum1 strnum2 strtod \ - subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 \ + subamp subback subi18n subsepnm subslash substr swaplns synerr1 synerr2 synerr3 \ tailrecurse tradanch trailbs tweakfld \ uninit2 uninit3 uninit4 uninit5 uninitialized unterm uparrfs uplus \ wideidx wideidx2 widesub widesub2 widesub3 widesub4 wjposer1 \ @@ -3098,6 +3104,11 @@ fsbs: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +fscaret: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fsnul1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -3840,6 +3851,11 @@ synerr2: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +synerr3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + tailrecurse: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index e557cb2b..1de780ec 100644 --- a/test/Maketests +++ b/test/Maketests @@ -362,6 +362,11 @@ fsbs: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +fscaret: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + fsnul1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -1104,6 +1109,11 @@ synerr2: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +synerr3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + tailrecurse: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/fscaret.awk b/test/fscaret.awk new file mode 100644 index 00000000..134820d7 --- /dev/null +++ b/test/fscaret.awk @@ -0,0 +1,8 @@ +BEGIN { + FS="^." + OFS="|" +} +{ + $1 = $1 +} +1 diff --git a/test/fscaret.in b/test/fscaret.in new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/test/fscaret.in @@ -0,0 +1 @@ +foo diff --git a/test/fscaret.ok b/test/fscaret.ok new file mode 100644 index 00000000..38287d58 --- /dev/null +++ b/test/fscaret.ok @@ -0,0 +1 @@ +|oo diff --git a/test/synerr3.awk b/test/synerr3.awk new file mode 100644 index 00000000..49b9e30a --- /dev/null +++ b/test/synerr3.awk @@ -0,0 +1 @@ +for (i = ) in foo bar baz diff --git a/test/synerr3.ok b/test/synerr3.ok new file mode 100644 index 00000000..b8b9dd89 --- /dev/null +++ b/test/synerr3.ok @@ -0,0 +1,5 @@ +gawk: synerr3.awk:1: for (i = ) in foo bar baz +gawk: synerr3.awk:1: ^ syntax error +gawk: synerr3.awk:1: for (i = ) in foo bar baz +gawk: synerr3.awk:1: ^ syntax error +EXIT CODE: 2 |