Add expected stdout and stderr fixtures to wave-test metadata
- Lingua principale
- Rust
- Stelle
- 53
- Fork
- 16
- Merge medio
- 4h 22m
- PR unite (30g)
- 46
Descrizione
## Problem
The Wave E2E runner can validate exit status and compiled artifacts, but successful native tests are not able to declare their expected stdout or stderr. Output regressions may therefore pass as long as the process exits successfully and does not match a generic failure pattern.
## Proposed contract
Support fixture-backed metadata such as:
```wave
// wave-test: stdout-file=expected/hello.stdout, stderr-file=expected/hello.stderr
```
## Scope
- Add optional stdout/stderr fixture fields to `TestMetadata`.
- Resolve paths under a documented test fixture root.
- Reject absolute paths and path traversal.
- Compare exact UTF-8 output after documenting newline behavior.
- Show a readable diff on mismatch.
- Add metadata parser and runner unit tests.
- Migrate at least two stable E2E cases.
## Completion criteria
- [ ] Output contracts are optional and do not affect existing tests.
- [ ] Mismatches fail with expected/actual context.
- [ ] Empty output can be asserted explicitly.
- [ ] JSON test reports record output-contract failures.
- [ ] The metadata guide in #357 is updated.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando TestMetadata, il parser dei metadati e il runner E2E, quindi esamina i metadati esistenti e i casi E2E stabili. Leggi la guida ai metadati di #357 e i test unitari di parser/runner; il lavoro è completato quando sono presenti percorsi di fixture sicuri e opzionali, controlli esatti dell'output con diff leggibili, report degli errori in JSON, casi migrati e documentazione aggiornata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- testing
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 58/100