This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Simplify the code for a group of tests in pat_advanced.t
authorNicholas Clark <nick@ccl4.org>
Thu, 3 Mar 2011 16:09:35 +0000 (16:09 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 3 Mar 2011 16:09:35 +0000 (16:09 +0000)
t/re/pat_advanced.t

index ab2c9b7..17fb905 100644 (file)
@@ -178,14 +178,14 @@ sub run_tests {
             "ff" => [1, 1, 0],
            "100" => [0, 1, 1],
         );
-      SKIP:
+
         while (my ($code, $match) = each %d) {
             local $Message = "Properties of \\x$code";
             my $char = eval qq ["\\x{$code}"];
-            my $i = 0;
-            ok (($char =~ /[\x80-\xff]/)            xor !$$match [$i ++]);
-            ok (($char =~ /[\x80-\x{100}]/)         xor !$$match [$i ++]);
-            ok (($char =~ /[\x{100}]/)              xor !$$match [$i ++]);
+
+            iseq(0 + ($char =~ /[\x80-\xff]/),    $$match[0]);
+            iseq(0 + ($char =~ /[\x80-\x{100}]/), $$match[1]);
+            iseq(0 + ($char =~ /[\x{100}]/),      $$match[2]);
         }
     }