Make File::Glob more VMS-friendly (Charles Lane)
[p5sagit/p5-mst-13.2.git] / t / lib / posix.t
index 7fb5f62..abc4563 100755 (executable)
@@ -14,7 +14,7 @@ use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write);
 use strict subs;
 
 $| = 1;
-print "1..26\n";
+print "1..27\n";
 
 $Is_W32 = $^O eq 'MSWin32';
 
@@ -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"; }
@@ -118,6 +121,7 @@ try_strftime(23, "Mon Mar 01 00:00:00 1999 060", 0,0,24, 28,1,99);
 try_strftime(24, "Mon Feb 28 00:00:00 2000 059", 0,0,0, 28,1,100);
 try_strftime(25, "Tue Feb 29 00:00:00 2000 060", 0,0,0, 0,2,100);
 try_strftime(26, "Wed Mar 01 00:00:00 2000 061", 0,0,0, 1,2,100);
+try_strftime(27, "Fri Mar 31 00:00:00 2000 091", 0,0,0, 31,2,100);
 &POSIX::setlocale(&POSIX::LC_TIME, $lc) if $Config{d_setlocale};
 
 $| = 0;