Skip to content

test(parser): pin #424 redirect-target rejection and procsub input-side regressions - #464

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/extglob-redirect-reject
Oct 9, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/extglob-redirect-reject

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Summary

#424's functional resolution already landed on master via the wt63 lane (278a855, byte-verified against WSL GNU Bash 5.3.0): with the extglob parse gate closed, an unmatched extglob redirect target strands the bare (' and the parser reports GNU's syntax error near unexpected token `(''' with status 2 — no literal file is ever created; with the gate open, a no-match pattern follows GNU subst.c expand_words_no_vars and is kept as the dequoted literal filename. The issue stayed open without coverage for several of the report's exact shapes, so this PR pins them as regressions.

New regression coverage (tests/issue424_redirect_extglob_interactive_parse.rs)

  • standalone >?(zz)out redirect: rc=2, GNU diagnostic, no literal ?(zz)out file
  • canonical echo hi >?(zz)out one-liner: rc=2, offending line echoed, nothing after the abort runs, no file
  • >>?(zz)out and 2>?(zz)out: same WORD-operand grammar, same rejection
  • input side is NOT part of the rejection: echo hi <(zz) process substitution keeps working with the gate on and off (zz: command not found, hi /dev/fd/N)
  • all pre-existing [bug] unmatched extglob redirect target >?(zz)out creates a literal file (GNU: syntax error near unexpected token) #424 shape tests (literal retention, quoting, failglob, escaped introducer, interactive survival, whole-line echo) unchanged and green

Test plan

closes #424

…de regressions

Hardens the wt63 #424 resolution with the exact shapes from the issue
report: the standalone `>?(zz)out' redirect, the canonical
`echo hi >?(zz)out' one-liner, and the `>>'/`2>' operator family all
abort with GNU's `syntax error near unexpected token `(''' (rc=2)
without creating a literal `?(zz)out' file, while the input-side
`<(' process substitution keeps working with the extglob gate on and
off. All shapes byte-match the merged GNU 5.3.0 verified behavior.

closes #424
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.

[bug] unmatched extglob redirect target >?(zz)out creates a literal file (GNU: syntax error near unexpected token)

1 participant