diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-09 09:52:31 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-09 09:52:31 +0000 |
commit | 8ff953de4413c0a2ba18ee101fe681711dfa55e3 (patch) | |
tree | b367305c895cc68b3e188ec2ca97243df1ff3044 /t | |
parent | 53f65a9ef4a04e5ea5160b41d8a2658d35d8f4e5 (diff) | |
download | perl-8ff953de4413c0a2ba18ee101fe681711dfa55e3.tar.gz |
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.
p4raw-id: //depot/perl@34781
Diffstat (limited to 't')
-rw-r--r-- | t/op/sprintf2.t | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t index 3e608d801e..c27df06235 100644 --- a/t/op/sprintf2.t +++ b/t/op/sprintf2.t @@ -148,20 +148,23 @@ eval { my $q = pack "q", 0 }; 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"); + } } } |