diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 8 | ||||
-rw-r--r-- | test/iolint.awk | 15 | ||||
-rw-r--r-- | test/iolint.ok | 14 |
3 files changed, 23 insertions, 14 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 2808eaf9..3a06dae2 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2021-05-15 Eli Zaretskii <eliz@gnu.org> + + * iolint.ok: Reorder results to follow the order of iolint.awk. + + * iolint.awk: Use "BINMODE = 2", otherwise the result of cksum on + non-Posix platforms will not match. Reorder the tests to make the + binary mode used only in the last one. + 2021-05-13 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (EXPECTED_FAIL_ZOS): Updated and sorted / uniqued. diff --git a/test/iolint.awk b/test/iolint.awk index a866ed6d..257678ed 100644 --- a/test/iolint.awk +++ b/test/iolint.awk @@ -37,13 +37,6 @@ BEGIN { print close("f2") # -1 expected here fflush() - # `%.*s' used for output file and output pipe" - print "junk" > "cksum" # cksum is more portable than md5sum - print "hello" | "cksum" - print close("cksum") - print close("cksum") - fflush() - # `%.*s' used for input pipe and output file "echo hello" | getline junk print "hello" > "echo hello" @@ -68,4 +61,12 @@ BEGIN { print close("echo hello") print close("echo hello") fflush() + + # `%.*s' used for output file and output pipe" + BINMODE = 2 + print "junk" > "cksum" # cksum is more portable than md5sum + print "hello" | "cksum" + print close("cksum") + print close("cksum") + fflush() } diff --git a/test/iolint.ok b/test/iolint.ok index 0008b0aa..fbf514c2 100644 --- a/test/iolint.ok +++ b/test/iolint.ok @@ -16,18 +16,18 @@ gawk: iolint.awk:35: warning: unnecessary mixing of `>' and `>>' for file `f2' 0 gawk: iolint.awk:37: warning: close: `f2' is not an open file, pipe or co-process -1 -gawk: iolint.awk:42: warning: `cksum' used for output file and output pipe -3015617425 6 -0 -0 -gawk: iolint.awk:49: warning: `echo hello' used for input pipe and output file +gawk: iolint.awk:42: warning: `echo hello' used for input pipe and output file 0 0 -gawk: iolint.awk:60: warning: `cat' used for output file and output pipe +gawk: iolint.awk:53: warning: `cat' used for output file and output pipe 0 hello 0 -gawk: iolint.awk:67: warning: `echo hello' used for input pipe and output pipe +gawk: iolint.awk:60: warning: `echo hello' used for input pipe and output pipe hello 0 0 +gawk: iolint.awk:68: warning: `cksum' used for output file and output pipe +3015617425 6 +0 +0 |