diff options
-rw-r--r-- | pc/Makefile.tst | 15 | ||||
-rw-r--r-- | test/ChangeLog | 4 | ||||
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rw-r--r-- | test/Makefile.in | 7 | ||||
-rw-r--r-- | test/iolint.awk | 12 | ||||
-rw-r--r-- | test/iolint.ok | 6 |
6 files changed, 23 insertions, 24 deletions
diff --git a/pc/Makefile.tst b/pc/Makefile.tst index d0085049..7bab0e3d 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -1037,9 +1037,9 @@ testext:: @echo $@ @$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk @$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \ - then cmp "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \ - else cmp "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi + @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \ + then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \ + else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi getfile: @echo Expect $@ to fail with MinGW. @@ -1182,9 +1182,9 @@ ignrcas3:: arrdbg: @echo $@ @$(AWK) -v "okfile=./$@.ok" -v "mpfr_okfile=./$@-mpfr.ok" -f "$(srcdir)"/$@.awk | grep array_f >_$@ || echo EXIT CODE: $$? >> _$@ - @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \ - then cmp "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \ - else cmp "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi + @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \ + then $(CMP) "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \ + else $(CMP) "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi sourcesplit: @echo $@ @@ -1238,10 +1238,9 @@ typedregex4: iolint: @echo $@ @echo hello > 'echo hello' - @touch 'exec cat' ; chmod 755 'exec cat' @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - @-$(RM) -f cat 'echo hello' 'exec cat' f1 f2 cksum + @-$(RM) -f cat 'echo hello' f1 f2 cksum argcasfile: @echo $@ diff --git a/test/ChangeLog b/test/ChangeLog index 6e6f3568..cf133b5c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -7,6 +7,10 @@ - Don't use egrep -q, not portable to Solaris 10. - Use $(CMP) instead of cmp. + * iolint.awk: Change order so can use plain 'cat' instead of + 'exec cat'. Makes it available for MinGW. + * Makefile.am (iolint): Update shell recipe. + 2021-05-09 Eli Zaretskii <eliz@gnu.org> * Makefile.am (EXPECTED_FAIL_MINGW): Update for the new tests. diff --git a/test/Makefile.am b/test/Makefile.am index 2a078630..99fb3438 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -2478,10 +2478,9 @@ typedregex4: iolint: @echo $@ @echo hello > 'echo hello' - @touch 'exec cat' ; chmod 755 'exec cat' @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - @-$(RM) -f cat 'echo hello' 'exec cat' f1 f2 cksum + @-$(RM) -f cat 'echo hello' f1 f2 cksum argcasfile: @echo $@ diff --git a/test/Makefile.in b/test/Makefile.in index 273badce..4b113466 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -2732,7 +2732,7 @@ testext:: @echo $@ @$(AWK) ' /^(@load|BEGIN)/,/^}/' "$(top_srcdir)"/extension/testext.c > testext.awk @$(AWK) -f ./testext.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \ + @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \ then $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; \ else $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ testext.awk testexttmp.txt ; fi @@ -2870,7 +2870,7 @@ ignrcas3:: arrdbg: @echo $@ @$(AWK) -v "okfile=./$@.ok" -v "mpfr_okfile=./$@-mpfr.ok" -f "$(srcdir)"/$@.awk | grep array_f >_$@ || echo EXIT CODE: $$? >> _$@ - @-if echo "$$GAWK_TEST_ARGS" | egrep -q -e '-M|--bignum'; \ + @-if echo "$$GAWK_TEST_ARGS" | egrep -e '-M|--bignum' > /dev/null; \ then $(CMP) "."/$@-mpfr.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; \ else $(CMP) "."/$@.ok _$@ && rm -f _$@ $@.ok $@-mpfr.ok ; fi @@ -2925,10 +2925,9 @@ typedregex4: iolint: @echo $@ @echo hello > 'echo hello' - @touch 'exec cat' ; chmod 755 'exec cat' @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - @-$(RM) -f cat 'echo hello' 'exec cat' f1 f2 cksum + @-$(RM) -f cat 'echo hello' f1 f2 cksum argcasfile: @echo $@ diff --git a/test/iolint.awk b/test/iolint.awk index bd102c5d..a866ed6d 100644 --- a/test/iolint.awk +++ b/test/iolint.awk @@ -55,13 +55,11 @@ BEGIN { # `%.*s' used for output file and two-way pipe # `%.*s' used for output pipe and two-way pipe # Not doing |& due to race condition and signals. sigh - exec_cat = "exec cat" - print "/bin/cat \"$@\"" > exec_cat - print "hello" | exec_cat - # print "hello" |& exec_cat - print close(exec_cat) - print close(exec_cat) - # print close(exec_cat) + cat = "cat" + print "hello" | "cat" + print "/bin/cat \"$@\"" > "cat" + print close("cat") + print close("cat") fflush() # `%.*s' used for input pipe and output pipe diff --git a/test/iolint.ok b/test/iolint.ok index 078ae425..98743f97 100644 --- a/test/iolint.ok +++ b/test/iolint.ok @@ -23,11 +23,11 @@ gawk: iolint.awk:42: warning: `cksum' used for output file and output pipe gawk: iolint.awk:49: warning: `echo hello' used for input pipe and output file 0 0 -gawk: iolint.awk:60: warning: `exec cat' used for output file and output pipe -hello +gawk: iolint.awk:73: warning: `cat' used for output file and output pipe 0 +hello 0 -gawk: iolint.awk:69: warning: `echo hello' used for input pipe and output pipe +gawk: iolint.awk:82: warning: `echo hello' used for input pipe and output pipe hello 0 0 |