From d527e0c81d2efe98f258f1e1516a0e9cbe879154 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 5 Oct 2010 13:22:11 +0200 Subject: awk: 00.123 is not a octal constant; neither is 009.123. fixing this function old new delta my_strtod 80 113 +33 Signed-off-by: Denys Vlasenko --- testsuite/awk.tests | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'testsuite/awk.tests') diff --git a/testsuite/awk.tests b/testsuite/awk.tests index 9e5e5a0f1..56b11ca46 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests @@ -24,6 +24,12 @@ testing "awk hex const 2" "awk '{ print or(0x80000000,1) }'" "2.14748e+09\n" "" testing "awk oct const" "awk '{ print or(01234,1) }'" "669\n" "" "\n" SKIP= +# check that "hex/oct integer" heuristic doesn't kick in on 00NN.NNN +testing "awk floating const with leading zeroes" \ + "awk '{ printf \"%f %f\n\", \"000.123\", \"009.123\" }'" \ + "0.123000 9.123000\n" \ + "" "\n" + # long field seps requiring regex testing "awk long field sep" "awk -F-- '{ print NF, length(\$NF), \$NF }'" \ "2 0 \n3 0 \n4 0 \n5 0 \n" \ -- cgit v1.2.3