regexp.t: Skip tests that are supposed to
authorKarl Williamson <public@khwilliamson.com>
Wed, 9 Jan 2013 03:56:44 +0000 (20:56 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 9 Jan 2013 04:44:26 +0000 (21:44 -0700)
This reorders some if elsif ... blocks so that skip is tested for and
done before actually trying the test.  This only affected tests which
were supposed to generate compiler errors.

t/re/regexp.t

index d6e404f..144eb23 100644 (file)
@@ -166,14 +166,14 @@ EOFCODE
            eval $code;
        }
        chomp( my $err = $@ );
-       if ($result eq 'c') {
-           if ($err !~ m!^\Q$expect!) { print "not ok $test$todo (compile) $input => '$err'\n"; next TEST }
-           last;  # no need to study a syntax error
-       }
-       elsif ( $skip ) {
+       if ( $skip ) {
            print "ok $test # skipped", length($reason) ? " $reason" : '', "\n";
            next TEST;
        }
+       elsif ($result eq 'c') {
+           if ($err !~ m!^\Q$expect!) { print "not ok $test$todo (compile) $input => '$err'\n"; next TEST }
+           last;  # no need to study a syntax error
+       }
        elsif ( $todo_qr ) {
            print "not ok $test # TODO", length($reason) ? " - $reason" : '', "\n";
            next TEST;