summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDominic Dunlop <domo@computer.org>2000-10-13 21:17:57 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-13 22:11:31 +0000
commitf7137e37caaee9cb7b58305cc93e3aeeb9a32ab2 (patch)
tree94834ee89f01f266a508e5ae22cac5319b2b890f /t
parent5d1d4326e46d23745bc8205fab794e804711b784 (diff)
downloadperl-f7137e37caaee9cb7b58305cc93e3aeeb9a32ab2.tar.gz
op/sprintf.t patch for OS/390 (and any other host with limited
floating-point exponent length) Subject: Re: [ID 20001006.014] Not OK: perl v5.7.0 +DEVEL7158 on os390 05.00 (UNINSTALLED) [PATCH bleadperl] Message-Id: <p04320400b60cf2a6a05c@[192.168.1.4]> p4raw-id: //depot/perl@7225
Diffstat (limited to 't')
-rwxr-xr-xt/op/sprintf.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/sprintf.t b/t/op/sprintf.t
index 1fda31e2f0..22b0b48b53 100755
--- a/t/op/sprintf.t
+++ b/t/op/sprintf.t
@@ -56,8 +56,17 @@ for ($i = 1; @tests; $i++) {
}
elsif ($y eq ">$result<") # Some C libraries always give
{ # three-digit exponent
- print("ok $i >$result< $x # three-digit exponent accepted\n");
+ print("ok $i >$result< $x # three-digit exponent accepted\n");
}
+ elsif ($result =~ /[-+]\d{3}$/ &&
+ # Suppress tests with modulo of exponent >= 100 on platforms
+ # which can't handle such magnitudes (or where we can't tell).
+ ((!eval {require POSIX}) || # Costly: only do this if we must!
+ (length(&POSIX::DBL_MAX) - rindex(&POSIX::DBL_MAX, '+')) == 3))
+ {
+ print("ok $i >$template< >$data< >$result<",
+ " # Suppressed: exponent out of range?\n")
+ }
else {
$y = ($x eq $y ? "" : " => $y");
print("not ok $i >$template< >$data< >$result< $x$y",