test(parity): expected-exit=1 for 3 intentional-throw expected-output tests#4271
Merged
Conversation
… tests run_parity_tests.sh defaults an expected-output test's expected exit code to 0 when test-parity/expected-exit/<name>.txt is absent. test_issue_462, test_issue_510, and test_decorators_replacement_unsupported intentionally throw a TypeError (their expected/ snapshots already capture the error) but lacked an expected-exit entry, so the harness expected exit 0 while Perry correctly exits 1 (matching node). Add expected-exit=1 for all three; each now passes via run_parity_tests.sh --filter. No compiler/runtime change. Bumps to 0.5.1114.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
run_parity_tests.shcompares an expected-output test's process exit codeagainst
test-parity/expected-exit/<name>.txt, defaulting to0when that fileis absent. Three Perry-specific expected-output tests intentionally end by
throwing a
TypeError(verifying spec behavior) — their committedtest-parity/expected/<name>.txtsnapshots already capture the thrown error —but had no
expected-exitentry. So the harness expected exit0whilePerry (correctly, matching
node --experimental-strip-types) exits1,producing a false parity failure even though Perry's stdout+error and exit
already match Node.
Affected:
test_issue_462_nullish_property_access,test_issue_510_primitive_method_typeerror,test_decorators_replacement_unsupported.Fix
Add
test-parity/expected-exit/<name>.txt=1for all three.No runtime/compiler change — Perry's behavior was already correct; this only
corrects the harness's expected exit code for these throw-on-purpose cases.
Verification
Each now passes: