compiletest: Self-test for normalize-* with revisions

This commit is contained in:
Zalathar 2024-12-28 13:12:36 +11:00
parent dd84b7d5ee
commit ef19017f7c
3 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,2 @@
1st emitted line
second emitted line

View file

@ -0,0 +1,2 @@
first emitted line
2nd emitted line

View file

@ -0,0 +1,20 @@
//! Checks that `[rev] normalize-*` directives affect the specified revision,
//! and don't affect other revisions.
//!
//! This currently relies on the fact that `normalize-*` directives are
//! applied to run output, not just compiler output. If that ever changes,
//! this test might need to be adjusted.
//@ edition: 2021
//@ revisions: a b
//@ run-pass
//@ check-run-results
//@ normalize-stderr: "output" -> "emitted"
//@[a] normalize-stderr: "first" -> "1st"
//@[b] normalize-stderr: "second" -> "2nd"
fn main() {
eprintln!("first output line");
eprintln!("second output line");
}