diff options
Diffstat (limited to 'extension/rwarray.awk')
-rw-r--r-- | extension/rwarray.awk | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/extension/rwarray.awk b/extension/rwarray.awk deleted file mode 100644 index 5d1b7e9d..00000000 --- a/extension/rwarray.awk +++ /dev/null @@ -1,33 +0,0 @@ -@load "rwarray" - -BEGIN { - while ((getline word) > 0) - dict[word] = word word - - n = asorti(dict, dictindices) - for (i = 1; i <= n; i++) - printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "orig.out" - close("orig.out"); - - ret = writea("orig.bin", dict) - printf "writea() returned %d, expecting 1\n", ret - - - ret = reada("orig.bin", dict) - printf "reada() returned %d, expecting 1\n", ret - - n = asorti(dict, dictindices) - for (i = 1; i <= n; i++) - 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") -} |