summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-12-30 21:52:45 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-12-30 21:52:45 +0200
commitdad5f25058c4ecf69ebe4543a13281d3f28c69bc (patch)
tree8febb68d715ea8a08ed0da2955b5b780d6613500 /test
parentcbd2cf7f926f960fab1b5004e42c35515c1c8d9f (diff)
downloadgawk-dad5f25058c4ecf69ebe4543a13281d3f28c69bc.tar.gz
Build and test dynamic extensions on VMS. Documented too.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog1
-rw-r--r--test/fts.awk7
-rw-r--r--test/rwarray.awk25
3 files changed, 24 insertions, 9 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index dd73cbc6..cc81d9a4 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,6 +1,7 @@
2013-12-29 John E. Malmberg <wb8tyw@qsl.net>
* fts.awk: Adjust for VMS.
+ * rwarray.awk: Adjust for VMS.
2013-12-10 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/test/fts.awk b/test/fts.awk
index d2e55cab..70af560f 100644
--- a/test/fts.awk
+++ b/test/fts.awk
@@ -114,6 +114,13 @@ function process(pathname, data_array,
for (i in stat_data)
data_array[pathname]["."]["stat"][i] = stat_data[i]
+ os = ""
+ if (ENVIRON["AWKLIBPATH"] == "sys$disk:[-]") {
+ os = "VMS"
+ # Command in next section not valid on VMS.
+ return
+ }
+
command = ("ls -f " pathname)
while ((command | getline direntry) > 0) {
if (direntry == "." || direntry == "..")
diff --git a/test/rwarray.awk b/test/rwarray.awk
index 5d1b7e9d..0cb214ee 100644
--- a/test/rwarray.awk
+++ b/test/rwarray.awk
@@ -21,13 +21,20 @@ BEGIN {
printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "new.out"
close("new.out");
- ret = system("cmp orig.out new.out")
-
- if (ret == 0)
- print "old and new are equal - GOOD"
- else
- print "old and new are not equal - BAD"
-
- if (ret == 0 && !("KEEPIT" in ENVIRON))
- system("rm -f orig.bin orig.out new.out")
+ os = ""
+ if (ENVIRON["AWKLIBPATH"] == "sys$disk:[-]") {
+ os = "VMS"
+ # return status from system() on VMS can not be used here
+ }
+ if (os != "VMS") {
+ ret = system("cmp orig.out new.out")
+
+ if (ret == 0)
+ print "old and new are equal - GOOD"
+ else
+ print "old and new are not equal - BAD"
+
+ if (ret == 0 && !("KEEPIT" in ENVIRON))
+ system("rm -f orig.bin orig.out new.out")
+ }
}