diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-12-30 21:52:45 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-12-30 21:52:45 +0200 |
commit | dad5f25058c4ecf69ebe4543a13281d3f28c69bc (patch) | |
tree | 8febb68d715ea8a08ed0da2955b5b780d6613500 /test | |
parent | cbd2cf7f926f960fab1b5004e42c35515c1c8d9f (diff) | |
download | egawk-dad5f25058c4ecf69ebe4543a13281d3f28c69bc.tar.gz egawk-dad5f25058c4ecf69ebe4543a13281d3f28c69bc.tar.bz2 egawk-dad5f25058c4ecf69ebe4543a13281d3f28c69bc.zip |
Build and test dynamic extensions on VMS. Documented too.
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 1 | ||||
-rw-r--r-- | test/fts.awk | 7 | ||||
-rw-r--r-- | test/rwarray.awk | 25 |
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") + } } |