Skip to content

Commit ef19017

Browse files
committed
compiletest: Self-test for normalize-* with revisions
1 parent dd84b7d commit ef19017

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1st emitted line
2+
second emitted line
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
first emitted line
2+
2nd emitted line
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//! Checks that `[rev] normalize-*` directives affect the specified revision,
2+
//! and don't affect other revisions.
3+
//!
4+
//! This currently relies on the fact that `normalize-*` directives are
5+
//! applied to run output, not just compiler output. If that ever changes,
6+
//! this test might need to be adjusted.
7+
8+
//@ edition: 2021
9+
//@ revisions: a b
10+
//@ run-pass
11+
//@ check-run-results
12+
13+
//@ normalize-stderr: "output" -> "emitted"
14+
//@[a] normalize-stderr: "first" -> "1st"
15+
//@[b] normalize-stderr: "second" -> "2nd"
16+
17+
fn main() {
18+
eprintln!("first output line");
19+
eprintln!("second output line");
20+
}

0 commit comments

Comments
 (0)