Change 34781 by [EMAIL PROTECTED] on 2008/11/09 09:52:31

        Update format warning tests to expect "%lld" instead of "%d"
        when "%lld" was in the format string. Mark these warnings as
        TODO until this is fixed.

Affected files ...

... //depot/perl/t/op/sprintf2.t#13 edit

Differences ...

==== //depot/perl/t/op/sprintf2.t#13 (text) ====
Index: perl/t/op/sprintf2.t
--- perl/t/op/sprintf2.t#12~34780~      2008-11-08 20:22:15.000000000 -0800
+++ perl/t/op/sprintf2.t        2008-11-09 01:52:31.000000000 -0800
@@ -148,20 +148,23 @@
 my $Q = $@ eq '';
 
 my @tests = (
-  [ '%lld' => '%d', [qw( 4294967296 -100000000000000 )] ],
-  [ '%lli' => '%i', [qw( 4294967296 -100000000000000 )] ],
-  [ '%llu' => '%u', [qw( 4294967296  100000000000000 )] ],
-  [ '%Ld'  => '%d', [qw( 4294967296 -100000000000000 )] ],
-  [ '%Li'  => '%i', [qw( 4294967296 -100000000000000 )] ],
-  [ '%Lu'  => '%u', [qw( 4294967296  100000000000000 )] ],
+  [ '%lld' => [qw( 4294967296 -100000000000000 )] ],
+  [ '%lli' => [qw( 4294967296 -100000000000000 )] ],
+  [ '%llu' => [qw( 4294967296  100000000000000 )] ],
+  [ '%Ld'  => [qw( 4294967296 -100000000000000 )] ],
+  [ '%Li'  => [qw( 4294967296 -100000000000000 )] ],
+  [ '%Lu'  => [qw( 4294967296  100000000000000 )] ],
 );
 
 for my $t (@tests) {
-  my($fmt, $conv) = @$t;
-  for my $num (@{$t->[2]}) {
+  my($fmt, $nums) = @$t;
+  for my $num (@$nums) {
     my $w; local $SIG{__WARN__} = sub { $w = shift };
     is(sprintf($fmt, $num), $Q ? $num : $fmt, "quad: $fmt -> $num");
-    like($w, $Q ? '' : qr/Invalid conversion in sprintf: "$conv"/, "warning: 
$fmt");
+    {
+      local our $TODO = $Q ? "" : "warning doesn't contain length modifiers";
+      like($w, $Q ? '' : qr/Invalid conversion in sprintf: "$fmt"/, "warning: 
$fmt");
+    }
   }
 }
 
End of Patch.

Reply via email to