aboutsummaryrefslogtreecommitdiffstats
path: root/test/strnum2.awk
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2016-06-20 10:10:30 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2016-06-20 10:10:30 -0400
commit2d2744ec74076d29e94a2a004e308f73a86b9fa5 (patch)
tree0238d94fc263fd3cc6b2b9e5dc62204e5a985d5a /test/strnum2.awk
parent239d7cc07ec54ec7a69805f9a674bfbbbd72f9b1 (diff)
downloadegawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.tar.gz
egawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.tar.bz2
egawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.zip
Call fixtype in a few more places to make sure we check types properly.
Diffstat (limited to 'test/strnum2.awk')
-rw-r--r--test/strnum2.awk10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/strnum2.awk b/test/strnum2.awk
new file mode 100644
index 00000000..16e6f5d0
--- /dev/null
+++ b/test/strnum2.awk
@@ -0,0 +1,10 @@
+BEGIN {
+ split("1.234", f)
+ OFMT = "%.1f"
+ # check whether strnum is displayed the same way before and
+ # after force_number is called. Also, should numeric strings
+ # be formatted with OFMT or show the original string value?
+ print f[1]
+ x = f[1]+0 # trigger conversion to NUMBER
+ print f[1]
+}