diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-04-11 07:44:22 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-04-11 07:44:22 +0300 |
commit | ebb6772e9eabeb81e3cc9305a6bec7adf7aad450 (patch) | |
tree | 2cf743f82791db19cc7e31cab86b1fc9a4d5ddbb /test | |
parent | e069c636968370f0899d5e4ebaeb9c2341804245 (diff) | |
parent | a4b59faf911743b30f2e6e979c4f9c1ea0669ac3 (diff) | |
download | egawk-ebb6772e9eabeb81e3cc9305a6bec7adf7aad450.tar.gz egawk-ebb6772e9eabeb81e3cc9305a6bec7adf7aad450.tar.bz2 egawk-ebb6772e9eabeb81e3cc9305a6bec7adf7aad450.zip |
Merge branch 'master' into comment
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 27 | ||||
-rw-r--r-- | test/Makefile.am | 16 | ||||
-rw-r--r-- | test/Makefile.in | 16 | ||||
-rw-r--r-- | test/readfile2.awk | 12 | ||||
-rw-r--r-- | test/readfile2.ok | 21 | ||||
-rw-r--r-- | test/regrange.ok | 2 |
6 files changed, 87 insertions, 7 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 65409956..6d4cd1c2 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,30 @@ +2014-04-11 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (charset-msg-start): Add a warning message that tests + may fail without adequate locale support, per request from + Nelson H.F. Beebe. + +2014-04-08 Arnold D. Robbins <arnold@skeeve.com> + + * 4.1.1: Release tar ball made. + +2014-04-04 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am: Prettify list of tests a little bit. + +2014-04-03 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): Add readfile2.ok. Oops. + +2014-03-27 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (readfile2): New test. + * readfile2.awk, readfile2.ok: New files. + +2014-02-28 Arnold D. Robbins <arnold@skeeve.com> + + * regrange.ok: Update after code improvements. + 2014-02-03 Stepan Kasal <kasal@ucw.cz> * strftime.awk: the default format uses %e, not %d (Introduced on diff --git a/test/Makefile.am b/test/Makefile.am index 97848a00..238f2ed7 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -710,6 +710,8 @@ EXTRA_DIST = \ range1.ok \ readdir.awk \ readdir0.awk \ + readfile2.awk \ + readfile2.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ @@ -947,8 +949,7 @@ BASIC_TESTS = \ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 arysubnm asgext awkpath \ - back89 backgsub \ - badassign1 \ + back89 backgsub badassign1 \ childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ @@ -1021,7 +1022,7 @@ LOCALE_CHARSET_TESTS = \ SHLIB_TESTS = \ fnmatch filefuncs fork fork2 fts functab4 inplace1 inplace2 inplace3 \ - ordchr ordchr2 readdir readfile revout revtwoway rwarray testext time + ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time # List of the tests which should be run with --lint option: NEED_LINT = \ @@ -1144,6 +1145,10 @@ machine-msg-end: charset-msg-start: @echo "======== Starting tests that can vary based on character set or locale support ========" + @echo "************************************************" + @echo "** Some or all of these tests may fail if you **" + @echo "** have inadequate or missing locale support **" + @echo "************************************************" charset-msg-end: @echo "======== Done with tests that can vary based on character set or locale support ========" @@ -1736,6 +1741,11 @@ readfile:: @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok +readfile2:: + @echo $@ + @$(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.awk "$(srcdir)"/readdir.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 468c19c5..0831c597 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -956,6 +956,8 @@ EXTRA_DIST = \ range1.ok \ readdir.awk \ readdir0.awk \ + readfile2.awk \ + readfile2.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ @@ -1192,8 +1194,7 @@ BASIC_TESTS = \ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 arysubnm asgext awkpath \ - back89 backgsub \ - badassign1 \ + back89 backgsub badassign1 \ childin clobber closebad clsflnam compare compare2 concat1 concat2 \ concat3 concat4 convfmt \ datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress dynlj \ @@ -1263,7 +1264,7 @@ LOCALE_CHARSET_TESTS = \ SHLIB_TESTS = \ fnmatch filefuncs fork fork2 fts functab4 inplace1 inplace2 inplace3 \ - ordchr ordchr2 readdir readfile revout revtwoway rwarray testext time + ordchr ordchr2 readdir readfile readfile2 revout revtwoway rwarray testext time # List of the tests which should be run with --lint option: @@ -1571,6 +1572,10 @@ machine-msg-end: charset-msg-start: @echo "======== Starting tests that can vary based on character set or locale support ========" + @echo "************************************************" + @echo "** Some or all of these tests may fail if you **" + @echo "** have inadequate or missing locale support **" + @echo "************************************************" charset-msg-end: @echo "======== Done with tests that can vary based on character set or locale support ========" @@ -2160,6 +2165,11 @@ readfile:: @$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok +readfile2:: + @echo $@ + @$(AWK) -f "$(srcdir)"/$@.awk "$(srcdir)"/$@.awk "$(srcdir)"/readdir.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/readfile2.awk b/test/readfile2.awk new file mode 100644 index 00000000..c21483fc --- /dev/null +++ b/test/readfile2.awk @@ -0,0 +1,12 @@ +@load "readfile" +BEGIN { PROCINFO["readfile"] = 1 } +BEGINFILE { print "Start of", basename(FILENAME) } +{ printf ("%d: <%s>\n", FNR, $0 ) } +ENDFILE { print "End of", basename(FILENAME) } + +function basename(file, result) +{ + result = file + gsub(".*/", "", result) + return result +} diff --git a/test/readfile2.ok b/test/readfile2.ok new file mode 100644 index 00000000..be1ded6c --- /dev/null +++ b/test/readfile2.ok @@ -0,0 +1,21 @@ +Start of readfile2.awk +1: <@load "readfile" +BEGIN { PROCINFO["readfile"] = 1 } +BEGINFILE { print "Start of", basename(FILENAME) } +{ printf ("%d: <%s>\n", FNR, $0 ) } +ENDFILE { print "End of", basename(FILENAME) } + +function basename(file, result) +{ + result = file + gsub(".*/", "", result) + return result +} +> +End of readfile2.awk +Start of readdir.awk +1: <@load "readdir" + +{ print } +> +End of readdir.awk diff --git a/test/regrange.ok b/test/regrange.ok index 1fa00c70..ae8c6499 100644 --- a/test/regrange.ok +++ b/test/regrange.ok @@ -3,4 +3,4 @@ "c" ~ /[[a-d]/ --> 1 "\" ~ /[\[-\]]/ --> 1 "[.c.]" ~ /[a-[.e.]]/ --> 1 -"[.d.]" ~ /[[.c.]-[.z.]]/ --> 0 +"[.d.]" ~ /[[.c.]-[.z.]]/ --> 1 |