aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-08-14 16:55:56 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-08-14 16:55:56 +0300
commitfeb11c09caa22207cbf53bf7cfcdeca42d661b8b (patch)
tree4d660705dc659d48a858a35e9fd367d5c93a32a9
parent5ce09ba3867f5c9d3c3dc0c00c155c0ba0c224f6 (diff)
downloadegawk-feb11c09caa22207cbf53bf7cfcdeca42d661b8b.tar.gz
egawk-feb11c09caa22207cbf53bf7cfcdeca42d661b8b.tar.bz2
egawk-feb11c09caa22207cbf53bf7cfcdeca42d661b8b.zip
Update intarray test and ok files.
-rw-r--r--test/ChangeLog4
-rw-r--r--test/intarray.awk15
-rw-r--r--test/intarray.ok8
3 files changed, 16 insertions, 11 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 17367572..dbac66ec 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2016-08-14 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * intarray.awk, intarray.ok: Updated.
+
2016-08-03 Arnold D. Robbins <arnold@skeeve.com>
Remove typed regexes until they can be done correctly.
diff --git a/test/intarray.awk b/test/intarray.awk
index 2c30bd5f..8785ea9e 100644
--- a/test/intarray.awk
+++ b/test/intarray.awk
@@ -1,10 +1,19 @@
BEGIN {
- nf = split("5 |05|0x4|00| 5|-0x12| 011|-013", f, "|")
+ nf = split("5 |05|0x4|00| 5|-0x12| 011|-013|1.0|5.1e1|-5|-05|+2", f, "|")
for (i = 1; i <= nf; i++) {
delete g
+ g[f[i]]
+ for (x in g) {
+ if (x"" != f[i]"")
+ printf "Error in string test: [%s] != [%s]\n", x, f[i]
+ }
+
+ delete g
z = f[i]+0 # trigger numeric conversion
g[f[i]]
- for (x in g)
- printf "[%s]\n", x
+ for (x in g) {
+ if (x"" != f[i]"")
+ printf "Error in strnum test: [%s] != [%s]\n", x, f[i]
+ }
}
}
diff --git a/test/intarray.ok b/test/intarray.ok
index d4df7b8c..e69de29b 100644
--- a/test/intarray.ok
+++ b/test/intarray.ok
@@ -1,8 +0,0 @@
-[5 ]
-[05]
-[0x4]
-[00]
-[ 5]
-[-0x12]
-[ 011]
-[-013]