From: Karl Williamson Date: Wed, 9 Jan 2013 03:56:44 +0000 (-0700) Subject: regexp.t: Skip tests that are supposed to X-Git-Tag: upstream/5.20.0~4256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=565b86e2abfc92f45d648c347179769224e04098;p=platform%2Fupstream%2Fperl.git regexp.t: Skip tests that are supposed to 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. --- diff --git a/t/re/regexp.t b/t/re/regexp.t index d6e404f..144eb23 100644 --- a/t/re/regexp.t +++ b/t/re/regexp.t @@ -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;