diff options
-rw-r--r-- | test/ofmta.awk | 30 | ||||
-rw-r--r-- | test/ofmta.ok | 7 |
2 files changed, 37 insertions, 0 deletions
diff --git a/test/ofmta.awk b/test/ofmta.awk new file mode 100644 index 00000000..8f3bc6e8 --- /dev/null +++ b/test/ofmta.awk @@ -0,0 +1,30 @@ +# Date: Thu, 14 Apr 2011 08:18:55 -0500 +# From: j.eh@mchsi.com +# To: arnold@skeeve.com +# Subject: CONVFMT test for the test suite +# Message-ID: <20110414131855.GA1801@apollo> +# +# Hi, +# +# Please consider adding this to the test suite. 3.1.8 segfaults +# with this. +# +# Thanks, +# +# John +# +# +BEGIN { + i=1.2345 + i=3+i + a[i]="hi" + OFMT="%.1f" + print i + for (x in a) print x, a[x] + print a[i] + print "--------" + CONVFMT=OFMT="%.3f" + print i + for (x in a) print x, a[x] + print a[i] +} diff --git a/test/ofmta.ok b/test/ofmta.ok new file mode 100644 index 00000000..f050dc0e --- /dev/null +++ b/test/ofmta.ok @@ -0,0 +1,7 @@ +4.2 +4.2345 hi +hi +-------- +4.234 +4.2345 hi + |