5 unshift @INC, "../lib";
14 print "ok $test\n"; ++$test;
16 # printing characters should work
19 print "$test\n"; ++$test;
23 print "$h{ok} $test\n"; ++$test;
25 # poetry optimization should also
28 print "$x $test\n"; ++$test;
30 # but not when dots are involved
32 print "not " unless $x eq "MNO";
33 print "ok $test\n"; ++$test;
35 print "not " unless v1.20.300.4000 eq "\x{1}\x{14}\x{12c}\x{fa0}";
36 print "ok $test\n"; ++$test;
39 # now do the same without the "v"
42 print "ok $test\n"; ++$test;
45 $h{111.107.32} = "ok";
46 print "$h{ok } $test\n"; ++$test;
49 print "not " unless $x eq "MNO";
50 print "ok $test\n"; ++$test;
52 print "not " unless 1.20.300.4000 eq "\x{1}\x{14}\x{12c}\x{fa0}";
53 print "ok $test\n"; ++$test;
55 # test sprintf("%vd"...) etc
56 print "not " unless sprintf("%vd", "Perl") eq '80.101.114.108';
57 print "ok $test\n"; ++$test;
59 print "not " unless sprintf("%vd", v1.22.333.4444) eq '1.22.333.4444';
60 print "ok $test\n"; ++$test;
62 print "not " unless sprintf("%vx", "Perl") eq '50.65.72.6c';
63 print "ok $test\n"; ++$test;
65 print "not " unless sprintf("%vX", 1.22.333.4444) eq '1.16.14D.115C';
66 print "ok $test\n"; ++$test;
68 print "not " unless sprintf("%*v#o", ":", "Perl") eq '0120:0145:0162:0154';
69 print "ok $test\n"; ++$test;
71 print "not " unless sprintf("%*vb", "##", v1.22.333.4444)
72 eq '1##10110##101001101##1000101011100';
73 print "ok $test\n"; ++$test;
75 print "not " unless sprintf("%vd", join("", map { chr }
76 unpack "U*", v2001.2002.2003))
78 print "ok $test\n"; ++$test;
82 print "not " unless sprintf("%vd", "Perl") eq '80.101.114.108';
83 print "ok $test\n"; ++$test;
86 sprintf("%vd", 1.22.333.4444) eq '1.22.197.141.225.133.156';
87 print "ok $test\n"; ++$test;
89 print "not " unless sprintf("%vx", "Perl") eq '50.65.72.6c';
90 print "ok $test\n"; ++$test;
92 print "not " unless sprintf("%vX", v1.22.333.4444) eq '1.16.C5.8D.E1.85.9C';
93 print "ok $test\n"; ++$test;
95 print "not " unless sprintf("%*v#o", ":", "Perl") eq '0120:0145:0162:0154';
96 print "ok $test\n"; ++$test;
98 print "not " unless sprintf("%*vb", "##", v1.22.333.4444)
99 eq '1##10110##11000101##10001101##11100001##10000101##10011100';
100 print "ok $test\n"; ++$test;