diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-29 19:29:17 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-29 19:29:17 +0000 |
commit | 0443feb9948c031769abaa005f6f89ff1b87d37e (patch) | |
tree | aac7fbbf1971db4a6801b873bfbba8ba43674dc9 /t/base | |
parent | 5e52531c6439c4bb604589c00cec8f7cf00417d1 (diff) | |
download | perl-0443feb9948c031769abaa005f6f89ff1b87d37e.tar.gz |
OS/2: fp stringification fudge.
(After this the whole suite passes 98.30%)
p4raw-id: //depot/perl@16864
Diffstat (limited to 't/base')
-rw-r--r-- | t/base/num.t | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/t/base/num.t b/t/base/num.t index 37ef9fa1ce..97fa312893 100644 --- a/t/base/num.t +++ b/t/base/num.t @@ -109,14 +109,25 @@ print $a + 1 == 1001 ? "ok 30\n" : "not ok 30 #" . $a + 1 . "\n"; # back to some basic stringify tests # we expect NV stringification to work according to C sprintf %.*g rules -$a = 0.01; "$a"; -print $a eq "0.01" ? "ok 31\n" : "not ok 31 # $a\n"; +if ($^O eq 'os2') { # In the long run, fix this. For 5.8.0, deal. + $a = 0.01; "$a"; + print $a eq "0.01" || $a eq '1e-02' ? "ok 31\n" : "not ok 31 # $a\n"; -$a = 0.001; "$a"; -print $a eq "0.001" ? "ok 32\n" : "not ok 32 # $a\n"; + $a = 0.001; "$a"; + print $a eq "0.001" || $a eq '1e-03' ? "ok 32\n" : "not ok 32 # $a\n"; -$a = 0.0001; "$a"; -print $a eq "0.0001" ? "ok 33\n" : "not ok 33 # $a\n"; + $a = 0.0001; "$a"; + print $a eq "0.0001" || $a eq '1e-04' ? "ok 33\n" : "not ok 33 # $a\n"; +} else { + $a = 0.01; "$a"; + print $a eq "0.01" ? "ok 31\n" : "not ok 31 # $a\n"; + + $a = 0.001; "$a"; + print $a eq "0.001" ? "ok 32\n" : "not ok 32 # $a\n"; + + $a = 0.0001; "$a"; + print $a eq "0.0001" ? "ok 33\n" : "not ok 33 # $a\n"; +} $a = 0.00009; "$a"; print $a eq "9e-05" || $a eq "9e-005" ? "ok 34\n" : "not ok 34 # $a\n"; |