Change the regression test added by 26410 to use test.pl; this makes
[p5sagit/p5-mst-13.2.git] / t / op / ver.t
index 79c36b6..759104a 100755 (executable)
@@ -205,6 +205,9 @@ is(v200, eval("+v200"), 'v200 eq eval("+v200")' );
 # Tests for string/numeric value of $] itself
 my ($revision,$version,$subversion) = split '\.', sprintf("%vd",$^V);
 
+# $^V always displays the leading 'v' but we don't want that here
+$revision =~ s/^v//;
+
 print "# revision   = '$revision'\n";
 print "# version    = '$version'\n";
 print "# subversion = '$subversion'\n";
@@ -222,7 +225,7 @@ ok( $v eq "$]", qq{\$^V eq "\$]"});
 
 $v = $revision + $version/1000 + $subversion/1000000;
 
-ok( $v == $], "\$^V == \$] (numeric)" );
+ok( abs($v - $]) < 10**-8 , "\$^V == \$] (numeric)" );
 
 SKIP: {
   skip("In EBCDIC the v-string components cannot exceed 2147483647", 6)