diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-08-16 10:14:32 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-08-16 10:14:32 -0400 |
commit | 6602e3d0106728ce6d6919e27de943e8d986fdf8 (patch) | |
tree | 7c79ed9f0acb40485c6eb2268e37803dca7f2feb /test/arrdbg.awk | |
parent | ed6a8b0cbdfd4b2231b89bfa420147a88f7312cf (diff) | |
download | egawk-6602e3d0106728ce6d6919e27de943e8d986fdf8.tar.gz egawk-6602e3d0106728ce6d6919e27de943e8d986fdf8.tar.bz2 egawk-6602e3d0106728ce6d6919e27de943e8d986fdf8.zip |
When ARRAYDEBUG is defined, add a test using adump to check the array type.
Diffstat (limited to 'test/arrdbg.awk')
-rw-r--r-- | test/arrdbg.awk | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/arrdbg.awk b/test/arrdbg.awk new file mode 100644 index 00000000..951acb41 --- /dev/null +++ b/test/arrdbg.awk @@ -0,0 +1,17 @@ +function check(x, exptype, f) { + f[x] + printf "array_f subscript [%s]\n", x + printf "array_f subscript [%s]\n", x > okfile + adump(f, -1) + printf " array_func: %s_array_func\n", exptype > okfile +} + +BEGIN { + check(3.0, "cint") + check(-3, "int") + check("3.0", "str") + split(" 3", f, "|") # create a maybe_num value + check(f[1], "str") + check("0", "cint") + check("-1", "int") +} |