p4raw-id: //depot/perl@26332
require './test.pl';
}
-plan tests => 7;
+plan tests => 7 + 256;
is(
sprintf("%.40g ",0.01),
is($bad, 0, "unexpected warnings");
}
+{
+ foreach my $ord (0 .. 255) {
+ my $bad = 0;
+ local $SIG{__WARN__} = sub {
+ if ($_[0] !~ /^Invalid conversion in sprintf/) {
+ warn $_[0];
+ $bad++;
+ }
+ };
+ my $r = eval {sprintf '%v' . chr $ord};
+ is ($bad, 0, "pattern '%v' . chr $ord");
+ }
+}