diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 8 | ||||
-rw-r--r-- | test/Makefile.am | 13 | ||||
-rw-r--r-- | test/Makefile.in | 13 | ||||
-rw-r--r-- | test/backsmalls2.awk | 10 | ||||
-rw-r--r-- | test/backsmalls2.ok | 0 | ||||
-rw-r--r-- | test/pipeio3.ok2 | 4 |
6 files changed, 44 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index adc8cd66..d85a026d 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2013-11-03 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (backsmalls2): New test. + (pipeio3): Check results against pipeio3.ok2 if + the first check fails. + * backsmalls2.awk, backsmalls2.ok: New files. + * pipeio3.ok2: New file. This is the results on PPC Mac OS X. + 2013-10-30 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (pipeio3): Enhance test, again, to be more resilient diff --git a/test/Makefile.am b/test/Makefile.am index 597267f9..0023d934 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -118,6 +118,8 @@ EXTRA_DIST = \ backsmalls1.awk \ backsmalls1.in \ backsmalls1.ok \ + backsmalls2.awk \ + backsmalls2.ok \ badargs.ok \ badassign1.awk \ badassign1.ok \ @@ -655,6 +657,7 @@ EXTRA_DIST = \ pipeio2.ok \ pipeio3.awk \ pipeio3.ok \ + pipeio3.ok2 \ posix.awk \ posix.in \ posix.ok \ @@ -1008,7 +1011,7 @@ MACHINE_TESTS = double1 double2 fmtspcl intformat MPFR_TESTS = mpfrnr mpfrrnd mpfrieee mpfrexprange mpfrsort mpfrbigint LOCALE_CHARSET_TESTS = \ - asort asorti backbigs1 backsmalls1 \ + asort asorti backbigs1 backsmalls1 backsmalls2 \ fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 mbprintf4 rebt8b2 rtlenmb sort1 sprintfc @@ -1889,11 +1892,17 @@ backsmalls1: AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +backsmalls2: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + pipeio3: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @sed 's/.*sh.*cart:.*not found/sh: 1: cart: not found/' < _$@ >_x$@ ; mv _x$@ _$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ || $(CMP) "$(srcdir)"/$@.ok2 _$@ && rm -f _$@ # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index d192c171..fd21be38 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -336,6 +336,8 @@ EXTRA_DIST = \ backsmalls1.awk \ backsmalls1.in \ backsmalls1.ok \ + backsmalls2.awk \ + backsmalls2.ok \ badargs.ok \ badassign1.awk \ badassign1.ok \ @@ -873,6 +875,7 @@ EXTRA_DIST = \ pipeio2.ok \ pipeio3.awk \ pipeio3.ok \ + pipeio3.ok2 \ posix.awk \ posix.in \ posix.ok \ @@ -1221,7 +1224,7 @@ INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat MPFR_TESTS = mpfrnr mpfrrnd mpfrieee mpfrexprange mpfrsort mpfrbigint LOCALE_CHARSET_TESTS = \ - asort asorti backbigs1 backsmalls1 \ + asort asorti backbigs1 backsmalls1 backsmalls2 \ fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \ mbprintf1 mbprintf2 mbprintf3 mbprintf4 rebt8b2 rtlenmb sort1 sprintfc @@ -2283,11 +2286,17 @@ backsmalls1: AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +backsmalls2: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + pipeio3: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @sed 's/.*sh.*cart:.*not found/sh: 1: cart: not found/' < _$@ >_x$@ ; mv _x$@ _$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ || $(CMP) "$(srcdir)"/$@.ok2 _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: diff --git a/test/backsmalls2.awk b/test/backsmalls2.awk new file mode 100644 index 00000000..02326f58 --- /dev/null +++ b/test/backsmalls2.awk @@ -0,0 +1,10 @@ +BEGIN { + pat["^\\s*$"] = pat["^\\s+$"] = pat["^\\s?$"] = pat["^\\s{1}$"] = 1 + for (i in pat) { + if (" " !~ i) { + printf("pattern \"%s\" failed!\n", i) > "/dev/stderr" + exit 1 + } + } + exit 0 +} diff --git a/test/backsmalls2.ok b/test/backsmalls2.ok new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/backsmalls2.ok diff --git a/test/pipeio3.ok2 b/test/pipeio3.ok2 new file mode 100644 index 00000000..25d26293 --- /dev/null +++ b/test/pipeio3.ok2 @@ -0,0 +1,4 @@ +doing first print +sh: 1: cart: not found +gawk: pipeio3.awk:6: fatal: print to "cart" failed (Broken pipe) +EXIT CODE: 2 |