aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-05-18 21:09:05 +0300
committerArnold D. Robbins <arnold@skeeve.com>2021-05-18 21:09:05 +0300
commit195dffb2caa016698dba983e6fbf823d9a60a989 (patch)
tree18deed19d2ee43ed4bd3bb0175c4c48a3a322b28 /test
parent356f7fbe484236c43a589c3338387f0097c87859 (diff)
parentb5eced16ce35a70e72e7fc03e5b0ca33e0a80300 (diff)
downloadegawk-195dffb2caa016698dba983e6fbf823d9a60a989.tar.gz
egawk-195dffb2caa016698dba983e6fbf823d9a60a989.tar.bz2
egawk-195dffb2caa016698dba983e6fbf823d9a60a989.zip
Merge branch 'gawk-5.1-stable'
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog8
-rw-r--r--test/iolint.awk15
-rw-r--r--test/iolint.ok14
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