Skip to content

Commit 6386512

Browse files
committed
Add test showing we don't run test normalizations after the global normalizations
1 parent 721ed1b commit 6386512

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

tests/integrations/basic-fail/Cargo.stdout

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ tests/actual_tests_bless/no_main.rs ... FAILED
473473
tests/actual_tests_bless/no_main_manual.rs ... FAILED
474474
tests/actual_tests_bless/no_test.rs ... FAILED
475475
tests/actual_tests_bless/non_top_level_configs.rs ... FAILED
476+
tests/actual_tests_bless/normalization_override.rs ... ok
476477
tests/actual_tests_bless/pass.rs ... ok
477478
tests/actual_tests_bless/pass_with_annotation.rs ... FAILED
478479
tests/actual_tests_bless/revised_revision.rs ... FAILED
@@ -1078,7 +1079,7 @@ FAILURES:
10781079
tests/actual_tests_bless/unknown_revision2.rs
10791080
tests/actual_tests_bless/wrong_diagnostic_code.rs
10801081

1081-
test result: FAIL. 23 failed; 24 passed; 3 ignored
1082+
test result: FAIL. 23 failed; 25 passed; 3 ignored
10821083

10831084
Building dependencies ... ok
10841085
tests/actual_tests_bless_yolo/revisions_bad.rs (revision `foo`) ... ok
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//@normalize-stderr-test: "NORMALIZATION_OVERRIDE" -> "SUCCESS"
2+
3+
// Test that the above normalization will be run after the default normalization set in ui_tests_bless.rs
4+
5+
fn main() {
6+
asdf //~ ERROR: cannot find
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0425]: cannot find value `asdf` in this scope
2+
--> tests/actual_tests_bless/NORMALIZATION_OVERRIDE.rs:6:5
3+
|
4+
6 | asdf
5+
| ^^^^ not found in this scope
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0425`.

tests/integrations/basic-fail/tests/ui_tests_bless.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ fn main() -> ui_test::color_eyre::Result<()> {
4646
config.stdout_filter("in ([0-9]m )?[0-9\\.]+s", "");
4747
config.stderr_filter(r"[^ ]*/\.?cargo/registry/.*/", "$$CARGO_REGISTRY");
4848
config.path_stderr_filter(&std::path::Path::new(path), "$DIR");
49+
50+
// This is part of a test: we want to make sure the base filters are run first
51+
config.stderr_filter("normalization_override", "NORMALIZATION_OVERRIDE");
52+
4953
let _ = run_tests_generic(
5054
vec![config],
5155
default_file_filter,

0 commit comments

Comments
 (0)