14 print "ok $test\n"; ++$test;
16 # printing characters should work
17 if (ord("\t") == 9) { # ASCII
20 print "$test\n"; ++$test;
24 print "$h{ok} $test\n"; ++$test;
29 print "$test\n"; ++$test;
33 print "$h{ok} $test\n"; ++$test;
36 # poetry optimization should also
39 print "$x $test\n"; ++$test;
41 # but not when dots are involved
42 if (ord("\t") == 9) { # ASCII
48 print "not " unless $x eq "MNO";
49 print "ok $test\n"; ++$test;
51 print "not " unless v1.20.300.4000 eq "\x{1}\x{14}\x{12c}\x{fa0}";
52 print "ok $test\n"; ++$test;
55 # now do the same without the "v"
58 print "ok $test\n"; ++$test;
61 if (ord("\t") == 9) { # ASCII
62 $h{111.107.32} = "ok";
65 $h{150.146.64} = "ok";
67 print "$h{ok } $test\n"; ++$test;
69 if (ord("\t") == 9) { # ASCII
75 print "not " unless $x eq "MNO";
76 print "ok $test\n"; ++$test;
78 print "not " unless 1.20.300.4000 eq "\x{1}\x{14}\x{12c}\x{fa0}";
79 print "ok $test\n"; ++$test;
81 # test sprintf("%vd"...) etc
82 if (ord("\t") == 9) { # ASCII
83 print "not " unless sprintf("%vd", "Perl") eq '80.101.114.108';
86 print "not " unless sprintf("%vd", "Perl") eq '215.133.153.147';
88 print "ok $test\n"; ++$test;
90 print "not " unless sprintf("%vd", v1.22.333.4444) eq '1.22.333.4444';
91 print "ok $test\n"; ++$test;
93 if (ord("\t") == 9) { # ASCII
94 print "not " unless sprintf("%vx", "Perl") eq '50.65.72.6c';
97 print "not " unless sprintf("%vx", "Perl") eq 'd7.85.99.93';
99 print "ok $test\n"; ++$test;
101 print "not " unless sprintf("%vX", 1.22.333.4444) eq '1.16.14D.115C';
102 print "ok $test\n"; ++$test;
104 if (ord("\t") == 9) { # ASCII
105 print "not " unless sprintf("%#*vo", ":", "Perl") eq '0120:0145:0162:0154';
108 print "not " unless sprintf("%#*vo", ":", "Perl") eq '0327:0205:0231:0223';
110 print "ok $test\n"; ++$test;
112 print "not " unless sprintf("%*vb", "##", v1.22.333.4444)
113 eq '1##10110##101001101##1000101011100';
114 print "ok $test\n"; ++$test;
116 print "not " unless sprintf("%vd", join("", map { chr }
117 unpack 'U*', pack('U*',2001,2002,2003)))
119 print "ok $test\n"; ++$test;
123 if (ord("\t") == 9) { # ASCII
124 print "not " unless sprintf("%vd", "Perl") eq '80.101.114.108';
127 print "not " unless sprintf("%vd", "Perl") eq '215.133.153.147';
129 print "ok $test\n"; ++$test;
131 if (ord("\t") == 9) { # ASCII
133 sprintf("%vd", 1.22.333.4444) eq '1.22.197.141.225.133.156';
137 sprintf("%vd", 1.22.333.4444) eq '1.22.142.84.187.81.112';
139 print "ok $test\n"; ++$test;
141 if (ord("\t") == 9) { # ASCII
142 print "not " unless sprintf("%vx", "Perl") eq '50.65.72.6c';
145 print "not " unless sprintf("%vx", "Perl") eq 'd7.85.99.93';
147 print "ok $test\n"; ++$test;
149 if (ord("\t") == 9) { # ASCII
150 print "not " unless sprintf("%vX", v1.22.333.4444) eq '1.16.C5.8D.E1.85.9C';
153 print "not " unless sprintf("%vX", v1.22.333.4444) eq '1.16.8E.54.BB.51.70';
155 print "ok $test\n"; ++$test;
157 if (ord("\t") == 9) { # ASCII
158 print "not " unless sprintf("%#*vo", ":", "Perl") eq '0120:0145:0162:0154';
161 print "not " unless sprintf("%#*vo", ":", "Perl") eq '0327:0205:0231:0223';
163 print "ok $test\n"; ++$test;
165 if (ord("\t") == 9) { # ASCII
166 print "not " unless sprintf("%*vb", "##", v1.22.333.4444)
167 eq '1##10110##11000101##10001101##11100001##10000101##10011100';
170 print "not " unless sprintf("%*vb", "##", v1.22.333.4444)
171 eq '1##10110##10001110##1010100##10111011##1010001##1110000';
173 print "ok $test\n"; ++$test;
177 # bug id 20000323.056
179 print "not " unless "\x{41}" eq +v65;
183 print "not " unless "\x41" eq +v65;
187 print "not " unless "\x{c8}" eq +v200;
191 print "not " unless "\xc8" eq +v200;
195 print "not " unless "\x{221b}" eq v8731;