TEST -deparse: don't list unexpected pass as fail
authorDavid Mitchell <davem@iabyn.com>
Wed, 22 Nov 2017 12:25:28 +0000 (12:25 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 23 Nov 2017 08:52:16 +0000 (08:52 +0000)
When running a test script under TEST -deparse, if it passes, but
according to Porting/deparse-skips.txt it was expected to fail, then
don't list it as a failing test. It wil still get listed at the end
in the section on unexpected passes, so there's no need to list it twice.

t/TEST

diff --git a/t/TEST b/t/TEST
index d564973..63f0c36 100755 (executable)
--- a/t/TEST
+++ b/t/TEST
@@ -747,8 +747,7 @@ EOT
        # Deparse? Should it have passed or failed?
        if ($type eq 'deparse' && $test =~ $deparse_failures) {
            if (!$failure) {
-               # Wait, it didn't fail? Great news! Tell someone!
-               $failure = "FAILED--all tests passed but test should have failed";
+               # Wait, it didn't fail? Great news!
                push @unexpected_pass, $test;
            } else {
                # Bah, still failing. Mask it.