aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-05-08 22:34:01 +0300
committerArnold D. Robbins <arnold@skeeve.com>2021-05-08 22:34:01 +0300
commit7b2c1cd1c93dec77823b7d8d2e93f320dc4a6fb9 (patch)
tree6715ed70b1b4bc1131f87f943196627a050f20e7
parent262c9c0e14e68c2b4b5d00e88f1bacc6c9556f3a (diff)
downloadegawk-7b2c1cd1c93dec77823b7d8d2e93f320dc4a6fb9.tar.gz
egawk-7b2c1cd1c93dec77823b7d8d2e93f320dc4a6fb9.tar.bz2
egawk-7b2c1cd1c93dec77823b7d8d2e93f320dc4a6fb9.zip
Use cksum in test/iolint.awk.
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am2
-rw-r--r--test/iolint.awk8
-rw-r--r--test/iolint.ok4
4 files changed, 12 insertions, 7 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index d3e866ad..f22250dc 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2021-05-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * iolint.awk: Use cksum instead of md5sum, for better portability.
+ * iolint.ok: Adjusted.
+
2021-05-05 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (iolint): Fix for out-of-tree builds.
diff --git a/test/Makefile.am b/test/Makefile.am
index c0e37642..88d4bcd0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2480,7 +2480,7 @@ iolint:
@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 md5sum
+ @-$(RM) -f cat 'echo hello' 'exec cat' f1 f2 cksum
argcasfile:
@echo $@
diff --git a/test/iolint.awk b/test/iolint.awk
index 3f3bb22f..bd102c5d 100644
--- a/test/iolint.awk
+++ b/test/iolint.awk
@@ -38,10 +38,10 @@ BEGIN {
fflush()
# `%.*s' used for output file and output pipe"
- print "junk" > "md5sum"
- print "hello" | "md5sum"
- print close("md5sum")
- print close("md5sum")
+ 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
diff --git a/test/iolint.ok b/test/iolint.ok
index 70f1cd2b..078ae425 100644
--- a/test/iolint.ok
+++ b/test/iolint.ok
@@ -16,8 +16,8 @@ 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: `md5sum' used for output file and output pipe
-b1946ac92492d2347c6235b4d2611184 -
+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