forked from google/dart_cli_script
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Two Windows failures are caused by platform-native output differences:
sub_process_test.dart:an error while spawning is printed to stderrsub_process_test.dart:outputBytes returns the script's output as bytes
Reproduction
- Run: https://github.com/open-runtime/dart_cli_script/actions/runs/22376939954
- windows-x64 job: https://github.com/open-runtime/dart_cli_script/actions/runs/22376939954/job/64769258023
- windows-arm64 job: https://github.com/open-runtime/dart_cli_script/actions/runs/22376939954/job/64769258042
Root cause
- Spawn error text is OS/locale-dependent (and can differ in punctuation).
print()output bytes are platform-native (\r\non Windows vs\non Unix).
Expected behavior
Tests should remain strict enough to validate behavior without requiring locale-specific exact strings or Unix-only line endings.
Proposed approach
- Replace exact ProcessException string match with robust matcher (e.g.
startsWith('ProcessException:')+ stable prefix checks). - Make output bytes expectation platform-aware (
Platform.lineTerminator) or normalize line endings in test assertions. - Add a short contract note in docs/comments that
outputBytesreturns raw platform-native bytes.
Acceptance criteria
- Both tests pass on
windows-x64andwindows-arm64 - Both tests remain meaningful and green on Linux/macOS
- No weakening of failure signal (tests still verify correct behavior)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working