compiletest: Self-test for normalize-* with revisions
This commit is contained in:
parent
dd84b7d5ee
commit
ef19017f7c
3 changed files with 24 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
1st emitted line
|
||||
second emitted line
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
first emitted line
|
||||
2nd emitted line
|
||||
20
tests/ui/compiletest-self-test/normalize-with-revision.rs
Normal file
20
tests/ui/compiletest-self-test/normalize-with-revision.rs
Normal 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");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue