diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-09 13:42:58 +0000 |
---|---|---|
committer | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2008-11-09 13:42:58 +0000 |
commit | 1d1ac7bc98334889587f2985125658b93a408866 (patch) | |
tree | cb779b504a24c0ec0aa0eac5515730f3ee101771 /t | |
parent | d85e265b2ae3a60df7d1fa65504e5ad351eac3c7 (diff) | |
download | perl-1d1ac7bc98334889587f2985125658b93a408866.tar.gz |
Fix warning code in Perl_sv_vcatpvfn() to make the TODO
tests introduced with #34781 pass. Add some more warning
tests to t/lib/warnings/sv.
p4raw-id: //depot/perl@34783
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/sv | 30 | ||||
-rw-r--r-- | t/op/sprintf2.t | 5 |
2 files changed, 31 insertions, 4 deletions
diff --git a/t/lib/warnings/sv b/t/lib/warnings/sv index 1f66a8db6c..dbab90bf48 100644 --- a/t/lib/warnings/sv +++ b/t/lib/warnings/sv @@ -291,6 +291,16 @@ printf F "%" ; $a = sprintf "%" ; printf F "%\x02" ; $a = sprintf "%\x02" ; +printf F "%llz" ; +$a = sprintf "%llz" ; +printf F "%25llz" ; +$a = sprintf "%25llz" ; +printf F "%+2Lz" ; +$a = sprintf "%+2Lz" ; +printf F "%+2ll" ; +$a = sprintf "%+2ll" ; +printf F "%+2L\x03" ; +$a = sprintf "%+2L\x03" ; no warnings 'printf' ; printf F "%z\n" ; $a = sprintf "%z" ; @@ -298,6 +308,16 @@ printf F "%" ; $a = sprintf "%" ; printf F "%\x02" ; $a = sprintf "%\x02" ; +printf F "%llz" ; +$a = sprintf "%llz" ; +printf F "%25llz" ; +$a = sprintf "%25llz" ; +printf F "%+2Lz" ; +$a = sprintf "%+2Lz" ; +printf F "%+2ll" ; +$a = sprintf "%+2ll" ; +printf F "%+2L\x03" ; +$a = sprintf "%+2L\x03" ; EXPECT Invalid conversion in printf: "%z" at - line 4. Invalid conversion in sprintf: "%z" at - line 5. @@ -305,6 +325,16 @@ Invalid conversion in printf: end of string at - line 6. Invalid conversion in sprintf: end of string at - line 7. Invalid conversion in printf: "%\002" at - line 8. Invalid conversion in sprintf: "%\002" at - line 9. +Invalid conversion in printf: "%llz" at - line 10. +Invalid conversion in sprintf: "%llz" at - line 11. +Invalid conversion in printf: "%25llz" at - line 12. +Invalid conversion in sprintf: "%25llz" at - line 13. +Invalid conversion in printf: "%+2Lz" at - line 14. +Invalid conversion in sprintf: "%+2Lz" at - line 15. +Invalid conversion in printf: "%+2ll" at - line 16. +Invalid conversion in sprintf: "%+2ll" at - line 17. +Invalid conversion in printf: "%+2L\003" at - line 18. +Invalid conversion in sprintf: "%+2L\003" at - line 19. ######## # sv.c use warnings 'misc' ; diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t index c27df06235..2e225c8079 100644 --- a/t/op/sprintf2.t +++ b/t/op/sprintf2.t @@ -161,10 +161,7 @@ for my $t (@tests) { for my $num (@$nums) { my $w; local $SIG{__WARN__} = sub { $w = shift }; is(sprintf($fmt, $num), $Q ? $num : $fmt, "quad: $fmt -> $num"); - { - local our $TODO = $Q ? "" : "warning doesn't contain length modifiers"; - like($w, $Q ? '' : qr/Invalid conversion in sprintf: "$fmt"/, "warning: $fmt"); - } + like($w, $Q ? '' : qr/Invalid conversion in sprintf: "$fmt"/, "warning: $fmt"); } } |