Skip to content

Commit

Permalink
compiletest: Self-test for normalize-* with revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar committed Dec 28, 2024
1 parent dd84b7d commit ef19017
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1st emitted line
second emitted line
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
first emitted line
2nd emitted line
20 changes: 20 additions & 0 deletions tests/ui/compiletest-self-test/normalize-with-revision.rs
Original file line number Diff line number Diff line change
@@ -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");
}

0 comments on commit ef19017

Please sign in to comment.