YA sync with mainline
[p5sagit/p5-mst-13.2.git] / t / op / pack.t
index 11ada39..867da8d 100755 (executable)
@@ -19,7 +19,10 @@ print ($#ary == $#ary2 ? "ok 1\n" : "not ok 1\n");
 
 $out1=join(':',@ary);
 $out2=join(':',@ary2);
-print ($out1 eq $out2 ? "ok 2\n" : "not ok 2\n");
+# Using long double NVs may introduce greater accuracy than wanted.
+$out2 =~ s/:9\.87654321097999\d*:/:9.87654321098:/
+   if $Config{uselongdouble} eq 'define';
+print ($out1 eq $out2? "ok 2\n" : "not ok 2\n");
 
 print ($foo =~ /def/ ? "ok 3\n" : "not ok 3\n");
 
@@ -381,7 +384,9 @@ print $@ eq '' && $x eq 'ab3456789012' ? "ok $test\n" : "not ok $test\n";
 $test++;
 
 eval { ($x) = unpack 'a/a*/b*', '212ab' };
-print $@ eq '' && $x eq '100001100100' ? "ok $test\n" : "#$x,$@\nnot ok $test\n";
+my $expected_x = '100001100100';
+if ($Config{ebcdic} eq 'define') { $expected_x = '100000010100'; }
+print $@ eq '' && $x eq $expected_x ? "ok $test\n" : "#$x,$@\nnot ok $test\n";
 $test++;
 
 # 153..156: / with #