aboutsummaryrefslogtreecommitdiffstats
path: root/test/strnum2.awk
diff options
context:
space:
mode:
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]
+}