Re: new feature: s?printf parameter reordering
[p5sagit/p5-mst-13.2.git] / t / op / ver.t
index 08beced..b9ba589 100755 (executable)
@@ -5,7 +5,7 @@ BEGIN {
     @INC = '../lib';
 }
 
-print "1..23\n";
+print "1..28\n";
 
 my $test = 1;
 
@@ -102,10 +102,10 @@ print "not " unless sprintf("%vX", 1.22.333.4444) eq '1.16.14D.115C';
 print "ok $test\n";  ++$test;
 
 if (ord("\t") == 9) { # ASCII
-    print "not " unless sprintf("%*v#o", ":", "Perl") eq '0120:0145:0162:0154';
+    print "not " unless sprintf("%#*vo", ":", "Perl") eq '0120:0145:0162:0154';
 }
 else {
-    print "not " unless sprintf("%*v#o", ":", "Perl") eq '0327:0205:0231:0223';
+    print "not " unless sprintf("%#*vo", ":", "Perl") eq '0327:0205:0231:0223';
 }
 print "ok $test\n";  ++$test;
 
@@ -144,10 +144,10 @@ print "ok $test\n";  ++$test;
     print "ok $test\n";  ++$test;
 
     if (ord("\t") == 9) { # ASCII
-        print "not " unless sprintf("%*v#o", ":", "Perl") eq '0120:0145:0162:0154';
+        print "not " unless sprintf("%#*vo", ":", "Perl") eq '0120:0145:0162:0154';
     }
     else {
-        print "not " unless sprintf("%*v#o", ":", "Perl") eq '0327:0205:0231:0223';
+        print "not " unless sprintf("%#*vo", ":", "Perl") eq '0327:0205:0231:0223';
     }
     print "ok $test\n";  ++$test;
 
@@ -155,3 +155,27 @@ print "ok $test\n";  ++$test;
        eq '1##10110##11000101##10001101##11100001##10000101##10011100';
     print "ok $test\n";  ++$test;
 }
+
+{
+    # bug id 20000323.056
+
+    print "not " unless "\x{41}" eq +v65;
+    print "ok $test\n";
+    $test++;
+
+    print "not " unless "\x41" eq +v65;
+    print "ok $test\n";
+    $test++;
+
+    print "not " unless "\x{c8}" eq +v200;
+    print "ok $test\n";
+    $test++;
+
+    print "not " unless "\xc8" eq +v200;
+    print "ok $test\n";
+    $test++;
+
+    print "not " unless "\x{221b}" eq v8731;
+    print "ok $test\n";
+    $test++;
+}