Add stdin-file metadata to Wave end-to-end tests
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
## Problem
`tools/run_tests.py` hard-codes standard input for `test22.wave` and `test74.wave` by filename. Renaming a test silently changes its behavior, and new input-driven tests require another Python special case.
## Proposed contract
Add a metadata key that points to a repository test fixture, for example:
```wave
// wave-test: stdin-file=inputs/menu-selection.txt
```
The path should resolve relative to `tests/cases/` or another explicitly documented fixture root.
## Scope
- Add an optional `stdin_file` field to `TestMetadata`.
- Parse and validate `stdin-file=...`.
- Reject absolute paths and paths that escape the fixture root.
- Read the file as UTF-8 and pass it to the test process.
- Migrate `test22.wave` and `test74.wave`.
- Remove their filename-based branches.
## Completion criteria
- [ ] Input-driven tests no longer depend on numeric filenames.
- [ ] Missing, invalid, and escaping paths have unit tests.
- [ ] Existing E2E behavior remains unchanged.
- [ ] Python tooling tests pass.
Contributor guide
Research direction
Start in tools/run_tests.py, locating TestMetadata, the stdin-file parsing path, and the filename-based handling for test22.wave and test74.wave. Review the existing Python tooling tests and the tests/cases/ fixture layout before adding coverage for missing, absolute, and escaping paths. Done means UTF-8 fixture input is passed through metadata, both tests are migrated, filename branches are removed, and Python tooling tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100