test: make the TypeScript and Rust client-gen tests run on Windows - #233
Merged
timesler merged 1 commit intoJun 19, 2026
Merged
Conversation
The TypeScript vitest suite and two Rust `client_gen::python` tests assumed a Unix host and failed on Windows. atlassian-labs#231 made the generated CLI client work on Windows and fixed the Rust and Python suites; this covers the tests those left untouched. Test-only, and no change on Unix. - `client_gen::python`: compile the generated module with the `PYTHON` interpreter, not a literal `python3`. Unset `PYTHON` still means `python3`. - On Windows, expect both generated files (the shell script and the `.cmd`), select the `.cmd`, use `;`/`%PATH%`, run the `.cmd` through a shell, and normalize CRLF before comparing snapshots. Build paths with `join`/`dirname` so they use the OS separator. Other platforms keep the old values. Generated with Claude
timesler
approved these changes
Jun 19, 2026
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.
What was broken
The TypeScript vitest suite and two Rust
client_gen::pythontests assumed a Unixhost (
python3,/separators,:/$PATH, a single generated artifact, LF lineendings) and failed on Windows. #231 fixed the generated client and the Rust and
Python suites; these tests were the remaining Unix-only spot.
What this changes
Test-only, and no change on Unix.
client_gen::python: compile the generated module with thePYTHONinterpreter,not a literal
python3. UnsetPYTHONstill meanspython3..cmd), selectthe
.cmd, and use;/%PATH%; other platforms keep the single script and:/$PATH.join/dirnameso they use the OS separator instead of aliteral
/..cmdthrough a shell (Node can't run it directly).Checked
.cmdvia cmd.exe (local): vitest 91/91 and cargo--lib230/0 (incl.the two
client_gen::pythontests); the generated client dispatches--helpandrejects an unknown subcommand.
shscript via a POSIX shell (local): the same client'sshlauncherdispatches identically (
python3pointed at a real interpreter for the run, sincethis box ships only the Store stub).
shscript (CI): ubuntu CI on this PR exercises the native Linux path.Generated with Claude