blob: 669938b86bcebcba34f42fccbfbf58d0969926c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!./perl -w
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl';
}
plan tests => 3;
is(
sprintf("%.40g ",0.01),
sprintf("%.40g", 0.01)." ",
q(the sprintf "%.<number>g" optimization)
);
is(
sprintf("%.40f ",0.01),
sprintf("%.40f", 0.01)." ",
q(the sprintf "%.<number>f" optimization)
);
{
chop(my $utf8_format = "%-3s\x{100}");
is(
sprintf($utf8_format, "\xe4"),
"\xe4 ",
q(width calculation under utf8 upgrade)
);
}
|