diff options
author | Denys Vlasenko | 2010-10-05 13:22:11 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-10-05 13:22:11 +0200 |
commit | d527e0c81d2efe98f258f1e1516a0e9cbe879154 (patch) | |
tree | 104ab5a0d550ea60151891848581880c0eca7e9a /testsuite | |
parent | 5b3430017895001e134b6c37a0ea4d2c082ba209 (diff) | |
download | busybox-d527e0c81d2efe98f258f1e1516a0e9cbe879154.zip busybox-d527e0c81d2efe98f258f1e1516a0e9cbe879154.tar.gz |
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 <dvlasenk@redhat.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/awk.tests | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index 9e5e5a0..56b11ca 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" \ |