autogenerate API listing from comments in the source (from Benjamin
[p5sagit/p5-mst-13.2.git] / t / lib / posix.t
index 7fb5f62..10c06be 100755 (executable)
@@ -72,6 +72,9 @@ print getcwd() =~ m#/t$# ? "ok 13\n" : "not ok 13\n";
 if ($Config{d_strtod}) {
     $lc = &POSIX::setlocale(&POSIX::LC_NUMERIC, 'C') if $Config{d_setlocale};
     ($n, $x) = &POSIX::strtod('3.14159_OR_SO');
+# Using long double NVs may introduce greater accuracy than wanted.
+    $n =~ s/^3.14158999\d*$/3.14159/
+        if $Config{uselongdouble} eq 'define';
     print (($n == 3.14159) && ($x == 6) ? "ok 14\n" : "not ok 14\n");
     &POSIX::setlocale(&POSIX::LC_NUMERIC, $lc) if $Config{d_setlocale};
 } else { print "# strtod not present\n", "ok 14\n"; }