Skip to content

test(issue4227): pin case-syntax-error token selection - #4281

Merged
caomengxuan666 merged 2 commits into
masterfrom
captain/4227-case-token-pins
Nov 29, 2026
Merged

caomengxuan666 merged 2 commits into
masterfrom
captain/4227-case-token-pins

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

test(case): pin syntax-error token choice for case grammar

Refs #4227
UNVERIFIED-BY-CAPTAIN

What

Test-only regression pins. The filed face — case x in ;; esac
reporting esac instead of ;; — is already fixed on master
(verified at 60ed70e5 against the GNU bash 5.3.20 oracle: all
twelve probed shapes byte-identical in stderr, stdout and exit
status). This PR pins the whole neighbourhood so the token choice
cannot drift again:

  • tests/issues_4200_4299/issue4227_case_syntax_error_token.rs
    (new, +103): c01–c12 — leading/extra ;;, missing in, |,
    ), trailing junk word, both EOF forms, plus the legal-case
    control. Each asserts the exact two-line GNU diagnostic (report
    line + source echo) and status 2 (0 for the control).

本 PR 删除了什么

Nothing — test-only; no production code touched, no second
mechanism introduced.

Net lines

+105 test lines, 0 production lines.

Evidence

Test-only. All twelve case-syntax-error forms (c01-c12) on master
60ed70e are byte-identical with the GNU bash 5.3.20 oracle; the c01
fix noted on the issue holds and no adjacent face has a residual.
Adds 4 regression pins so the token selection cannot drift.

Refs #4227 (not Fixes).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant