Skip to content

fix(test-style): avoid escaping test-unit name regex#4012

Open
Kemalau wants to merge 1 commit intoShopify:mainfrom
Kemalau:clawoss/bug/3759-windows-test-command
Open

fix(test-style): avoid escaping test-unit name regex#4012
Kemalau wants to merge 1 commit intoShopify:mainfrom
Kemalau:clawoss/bug/3759-windows-test-command

Conversation

@Kemalau
Copy link

@Kemalau Kemalau commented Mar 16, 2026

What changed

  • stop shell-escaping the Test::Unit --name regex when building run-in-terminal commands
  • add a regression test that locks the Windows-safe command shape for a single example

Why

Shellwords.escape is correct for file paths and shell arguments, but it over-escapes the regex passed to Test::Unit's --name flag. On Windows this turns the trailing $ into \\$, so the generated command matches nothing and "Run Test in Terminal" reports zero tests.

Verification

  • Added a focused regression test in test/requests/resolve_test_commands_test.rb
  • I could not run the Ruby test suite in this environment because ruby/bundle are not installed here; the fix is based on the existing failing expectation pattern reported in the issue and the local diff review.

@Kemalau Kemalau requested a review from a team as a code owner March 16, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant