diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-06-26 21:45:39 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-06-26 21:45:39 +0300 |
commit | 5892bca92c6f98c5b4d64ff1da26aa7cc9dc39e2 (patch) | |
tree | eb583752f7959385701001bbba006a071cf96189 /test | |
parent | b19cc5185fbb54d8893d84bf7b29192069935813 (diff) | |
parent | 8ff0d3a5a55237f78a8c3076a07c38f7e1c1c5e9 (diff) | |
download | egawk-5892bca92c6f98c5b4d64ff1da26aa7cc9dc39e2.tar.gz egawk-5892bca92c6f98c5b4d64ff1da26aa7cc9dc39e2.tar.bz2 egawk-5892bca92c6f98c5b4d64ff1da26aa7cc9dc39e2.zip |
Merge branch 'gawk-5.0-stable'
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 11 | ||||
-rw-r--r-- | test/Makefile.am | 33 | ||||
-rw-r--r-- | test/Makefile.in | 33 | ||||
-rw-r--r-- | test/inplace1.ok | 2 | ||||
-rw-r--r-- | test/inplace2.ok | 2 | ||||
-rw-r--r-- | test/inplace3.ok | 4 | ||||
-rw-r--r-- | test/nsawk1.awk | 5 | ||||
-rw-r--r-- | test/nsawk1a.ok | 0 | ||||
-rw-r--r-- | test/nsawk1b.ok | 0 | ||||
-rw-r--r-- | test/nsawk1c.ok | 0 | ||||
-rw-r--r-- | test/nsawk2.awk | 5 | ||||
-rw-r--r-- | test/nsawk2a.ok | 1 | ||||
-rw-r--r-- | test/nsawk2b.ok | 1 |
13 files changed, 93 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index a53c2d13..a538c593 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,14 @@ +2019-06-26 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): New tests, nsawk1[abc] and nsawk2[ab]. + * nsawk1.awk, nsawk1a.ok, nsawk1b.ok, nsawk1c.ok, nsawk2.awk, + nsawk2a.ok, nsawk2b.ok: New files. + Tests courtesy of Michal Jaegermann. + + Unrelated: + + * inplace1.ok, inplace2.ok, inplace3.ok: Updated after code changes. + 2019-06-19 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (EXTRA_DIST): New test: escapebrace. diff --git a/test/Makefile.am b/test/Makefile.am index 58ee1304..d7f6e016 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -782,6 +782,13 @@ EXTRA_DIST = \ noparms.ok \ nors.in \ nors.ok \ + nsawk1.awk \ + nsawk1a.ok \ + nsawk1b.ok \ + nsawk1c.ok \ + nsawk2.awk \ + nsawk2a.ok \ + nsawk2b.ok \ nsbad.awk \ nsbad.ok \ nsbad_cmd.ok \ @@ -1353,6 +1360,7 @@ GAWK_EXT_TESTS = \ lint lintexp lintindex lintint lintlength lintold lintset lintwarn \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime muldimposix \ nastyparm negtime next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 \ + nsawk1a nsawk1b nsawk1c nsawk2a nsawk2b \ nsbad nsbad_cmd nsforloop nsfuncrecurse nsindirect1 nsindirect2 nsprof1 nsprof2 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge \ procinfs profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ @@ -2042,6 +2050,31 @@ readfile2:: @$(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.awk "$(srcdir)"/readdir.awk > _$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +nsawk1a:: + @echo $@ + @$(AWK) -f "$(srcdir)"/nsawk1.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk1b:: + @echo $@ + @$(AWK) -v I=fine -f "$(srcdir)"/nsawk1.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk1c:: + @echo $@ + @$(AWK) -v awk::I=fine -f "$(srcdir)"/nsawk1.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk2a:: + @echo $@ + @$(AWK) -v I=fine -f "$(srcdir)"/nsawk2.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk2b:: + @echo $@ + @$(AWK) -v awk::I=fine -f "$(srcdir)"/nsawk2.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + include2:: @echo $@ @AWKPATH="$(srcdir)" $(AWK) --include inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Makefile.in b/test/Makefile.in index ce5b2e26..53827516 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1041,6 +1041,13 @@ EXTRA_DIST = \ noparms.ok \ nors.in \ nors.ok \ + nsawk1.awk \ + nsawk1a.ok \ + nsawk1b.ok \ + nsawk1c.ok \ + nsawk2.awk \ + nsawk2a.ok \ + nsawk2b.ok \ nsbad.awk \ nsbad.ok \ nsbad_cmd.ok \ @@ -1612,6 +1619,7 @@ GAWK_EXT_TESTS = \ lint lintexp lintindex lintint lintlength lintold lintset lintwarn \ manyfiles match1 match2 match3 mbstr1 mbstr2 mixed1 mktime muldimposix \ nastyparm negtime next nondec nondec2 nonfatal1 nonfatal2 nonfatal3 \ + nsawk1a nsawk1b nsawk1c nsawk2a nsawk2b \ nsbad nsbad_cmd nsforloop nsfuncrecurse nsindirect1 nsindirect2 nsprof1 nsprof2 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge \ procinfs profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ @@ -2491,6 +2499,31 @@ readfile2:: @$(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.awk "$(srcdir)"/readdir.awk > _$@ || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +nsawk1a:: + @echo $@ + @$(AWK) -f "$(srcdir)"/nsawk1.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk1b:: + @echo $@ + @$(AWK) -v I=fine -f "$(srcdir)"/nsawk1.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk1c:: + @echo $@ + @$(AWK) -v awk::I=fine -f "$(srcdir)"/nsawk1.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk2a:: + @echo $@ + @$(AWK) -v I=fine -f "$(srcdir)"/nsawk2.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +nsawk2b:: + @echo $@ + @$(AWK) -v awk::I=fine -f "$(srcdir)"/nsawk2.awk > _$@ || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + include2:: @echo $@ @AWKPATH="$(srcdir)" $(AWK) --include inclib 'BEGIN {print sandwich("a", "b", "c")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/inplace1.ok b/test/inplace1.ok index 753079b3..f2e36d46 100644 --- a/test/inplace1.ok +++ b/test/inplace1.ok @@ -1,5 +1,5 @@ before -gawk: inplace:53: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' +gawk: inplace:59: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' stdin start is bar replaced? stdin end diff --git a/test/inplace2.ok b/test/inplace2.ok index 753079b3..f2e36d46 100644 --- a/test/inplace2.ok +++ b/test/inplace2.ok @@ -1,5 +1,5 @@ before -gawk: inplace:53: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' +gawk: inplace:59: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' stdin start is bar replaced? stdin end diff --git a/test/inplace3.ok b/test/inplace3.ok index 7802a0c8..b6f26505 100644 --- a/test/inplace3.ok +++ b/test/inplace3.ok @@ -1,11 +1,11 @@ before -gawk: inplace:53: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' +gawk: inplace:59: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' stdin start is bar replaced? stdin end after Before -gawk: inplace:53: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' +gawk: inplace:59: warning: inplace::begin: disabling in-place editing for invalid FILENAME `-' stdin start is foo replaced? stdin end diff --git a/test/nsawk1.awk b/test/nsawk1.awk new file mode 100644 index 00000000..00715bc1 --- /dev/null +++ b/test/nsawk1.awk @@ -0,0 +1,5 @@ +# Used to cause internal error +BEGIN { + x = awk::I + x = awk::I +} diff --git a/test/nsawk1a.ok b/test/nsawk1a.ok new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/nsawk1a.ok diff --git a/test/nsawk1b.ok b/test/nsawk1b.ok new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/nsawk1b.ok diff --git a/test/nsawk1c.ok b/test/nsawk1c.ok new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/nsawk1c.ok diff --git a/test/nsawk2.awk b/test/nsawk2.awk new file mode 100644 index 00000000..d275c121 --- /dev/null +++ b/test/nsawk2.awk @@ -0,0 +1,5 @@ +# Used to cause internal error +BEGIN { + x = awk::I + print x +} diff --git a/test/nsawk2a.ok b/test/nsawk2a.ok new file mode 100644 index 00000000..86815ca7 --- /dev/null +++ b/test/nsawk2a.ok @@ -0,0 +1 @@ +fine diff --git a/test/nsawk2b.ok b/test/nsawk2b.ok new file mode 100644 index 00000000..86815ca7 --- /dev/null +++ b/test/nsawk2b.ok @@ -0,0 +1 @@ +fine |