diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-09-13 15:37:25 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-09-13 15:37:25 +0300 |
commit | 2fcffaeee37416708fab505209a55ddd32846463 (patch) | |
tree | 1d31315cc63b8eae764d07e381d592e6bf9ac2b3 /test | |
parent | 1812b4752c0a2e8c5ec693eb3cd1c866a9952a2f (diff) | |
download | egawk-2fcffaeee37416708fab505209a55ddd32846463.tar.gz egawk-2fcffaeee37416708fab505209a55ddd32846463.tar.bz2 egawk-2fcffaeee37416708fab505209a55ddd32846463.zip |
Fix problem when extending NF. See test/nfloop.
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 9 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/nfloop.awk | 8 | ||||
-rw-r--r-- | test/nfloop.ok | 1 |
6 files changed, 30 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 15166f2f..ad0366f2 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -3,6 +3,11 @@ * Makefile.am: Fix quoting for generation of Maketests file so that it will happen correctly. + Unrelated: + + * Makefile.am (nfloop): New test. + * nfloop.awk, nfloop.ok: New files. + 2013-08-15 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am: Quote $(srcdir) everywhere so that tests can run diff --git a/test/Makefile.am b/test/Makefile.am index bbb0354c..8288cf7d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -540,6 +540,8 @@ EXTRA_DIST = \ nfldstr.awk \ nfldstr.in \ nfldstr.ok \ + nfloop.awk \ + nfloop.ok \ nfneg.awk \ nfneg.ok \ nfset.awk \ @@ -943,7 +945,7 @@ BASIC_TESTS = \ inputred intest intprec iobug1 \ leaddig leadnl litoct longsub longwrds \ manglprm math membug1 messages minusstr mmap8k mtchi18n \ - nasty nasty2 negexp negrange nested nfldstr nfneg nfset nlfldsep \ + nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \ nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ noparms nors nulrsend numindex numsubstr \ octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \ diff --git a/test/Makefile.in b/test/Makefile.in index 959ef3e0..31a22602 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -758,6 +758,8 @@ EXTRA_DIST = \ nfldstr.awk \ nfldstr.in \ nfldstr.ok \ + nfloop.awk \ + nfloop.ok \ nfneg.awk \ nfneg.ok \ nfset.awk \ @@ -1160,7 +1162,7 @@ BASIC_TESTS = \ inputred intest intprec iobug1 \ leaddig leadnl litoct longsub longwrds \ manglprm math membug1 messages minusstr mmap8k mtchi18n \ - nasty nasty2 negexp negrange nested nfldstr nfneg nfset nlfldsep \ + nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep \ nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \ noparms nors nulrsend numindex numsubstr \ octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \ @@ -2721,6 +2723,11 @@ nfldstr: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +nfloop: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + nfneg: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 1f3daf76..a1791a92 100644 --- a/test/Maketests +++ b/test/Maketests @@ -470,6 +470,11 @@ nfldstr: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +nfloop: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + nfneg: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/nfloop.awk b/test/nfloop.awk new file mode 100644 index 00000000..c37700ac --- /dev/null +++ b/test/nfloop.awk @@ -0,0 +1,8 @@ +BEGIN { + $0 = "aaa" + NF = 10 + for (j = 2; j <= NF; ++j) { + $j = "_" + } + print +} diff --git a/test/nfloop.ok b/test/nfloop.ok new file mode 100644 index 00000000..cc683eae --- /dev/null +++ b/test/nfloop.ok @@ -0,0 +1 @@ +aaa _ _ _ _ _ _ _ _ _ |