12 sprintf("%.40g ",0.01),
13 sprintf("%.40g", 0.01)." ",
14 q(the sprintf "%.<number>g" optimization)
17 sprintf("%.40f ",0.01),
18 sprintf("%.40f", 0.01)." ",
19 q(the sprintf "%.<number>f" optimization)
22 chop(my $utf8_format = "%-3s\x{100}");
24 sprintf($utf8_format, "\xe4"),
26 q(width calculation under utf8 upgrade)
30 # Used to mangle PL_sv_undef
32 'print sprintf "xxx%n\n"; print undef',
33 'Modification of a read-only value attempted at - line 1.',
34 { switches => [ '-w' ] },
35 q(%n should not be able to modify read-only constants),
38 # check %NNN$ for range bounds, especially negative 2's complement
41 my ($warn, $bad) = (0,0);
42 local $SIG{__WARN__} = sub {
43 if ($_[0] =~ /uninitialized/) {
50 my $result = sprintf join('', map("%$_\$s%" . ~$_ . '$s', 1..20)),
52 is($result, "abcd", "only four valid values");
53 is($warn, 36, "expected warnings");
54 is($bad, 0, "unexpected warnings");