aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2016-12-05 14:47:51 -0500
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2016-12-05 14:47:51 -0500
commit352af50d54071be81f6be1c4d93bfd791f473755 (patch)
tree72352160201c27fe8e7d465f6e961bc41f71859d /test
parent16761af5b3cec40f1e341cb33787af33cb2b45c2 (diff)
downloadegawk-352af50d54071be81f6be1c4d93bfd791f473755.tar.gz
egawk-352af50d54071be81f6be1c4d93bfd791f473755.tar.bz2
egawk-352af50d54071be81f6be1c4d93bfd791f473755.zip
Add strnum support to API. Update rwarray extension and test.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog4
-rw-r--r--test/rwarray.awk8
2 files changed, 12 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index a2dbdc5a..d2b0cf79 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2016-12-05 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * rwarray.awk: Check that strnum is recreated correctly.
+
2016-11-30 Arnold D. Robbins <arnold@skeeve.com>
* rwarray.awk: Use typeof() to verify that typed regex is
diff --git a/test/rwarray.awk b/test/rwarray.awk
index 70809b64..86a4b589 100644
--- a/test/rwarray.awk
+++ b/test/rwarray.awk
@@ -7,6 +7,10 @@ BEGIN {
re_sub = "/typed-regex/"
dict[re_sub] = @/search me/
+ strnum_sub = "strnum-sub"
+ split("-2.4", f)
+ dict[strnum_sub] = f[1]
+
n = asorti(dict, dictindices)
for (i = 1; i <= n; i++)
printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "orig.out"
@@ -43,4 +47,8 @@ BEGIN {
if (typeof(dict[re_sub]) != "regexp")
printf("dict[\"%s\"] should be regexp, is %s\n",
re_sub, typeof(dict[re_sub]));
+
+ if (typeof(dict[strnum_sub]) != "strnum")
+ printf("dict[\"%s\"] should be strnum, is %s\n",
+ strnum_sub, typeof(dict[strnum_sub]));
}