Skip to content

Commit c3a7d36

Browse files
committed
Support regexes in custom normalization in UI tests
1 parent 3fe1d9c commit c3a7d36

21 files changed

+48
-35
lines changed

src/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/test/ui/changing-crates.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// aux-build:changing-crates-a1.rs
1515
// aux-build:changing-crates-b.rs
1616
// aux-build:changing-crates-a2.rs
17+
// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2"
1718

1819
extern crate a;
1920
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on

src/test/ui/changing-crates.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0460]: found possibly newer version of crate `a` which `b` depends on
2-
--> $DIR/changing-crates.rs:19:1
2+
--> $DIR/changing-crates.rs:20:1
33
|
4-
19 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
4+
20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
55
| ^^^^^^^^^^^^^^^
66
|
77
= note: perhaps that crate needs to be recompiled?
88
= note: the following crate versions were found:
9-
crate `a`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/changing-crates.stage1-x86_64-pc-windows-gnu.aux/a.dll
10-
crate `b`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/changing-crates.stage1-x86_64-pc-windows-gnu.aux/b.dll
9+
crate `a`: $PATH_a
10+
crate `b`: $PATH_b
1111

1212
error: aborting due to previous error
1313

src/test/ui/svh-change-lit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// aux-build:svh-a-base.rs
1515
// aux-build:svh-b.rs
1616
// aux-build:svh-a-change-lit.rs
17+
// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2"
1718

1819
extern crate a;
1920
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on

src/test/ui/svh-change-lit.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0460]: found possibly newer version of crate `a` which `b` depends on
2-
--> $DIR/svh-change-lit.rs:19:1
2+
--> $DIR/svh-change-lit.rs:20:1
33
|
4-
19 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
4+
20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
55
| ^^^^^^^^^^^^^^^
66
|
77
= note: perhaps that crate needs to be recompiled?
88
= note: the following crate versions were found:
9-
crate `a`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/svh-change-lit.stage1-x86_64-pc-windows-gnu.aux/a.dll
10-
crate `b`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/svh-change-lit.stage1-x86_64-pc-windows-gnu.aux/b.dll
9+
crate `a`: $PATH_a
10+
crate `b`: $PATH_b
1111

1212
error: aborting due to previous error
1313

src/test/ui/svh-change-significant-cfg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// aux-build:svh-a-base.rs
1515
// aux-build:svh-b.rs
1616
// aux-build:svh-a-change-significant-cfg.rs
17+
// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2"
1718

1819
extern crate a;
1920
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0460]: found possibly newer version of crate `a` which `b` depends on
2-
--> $DIR/svh-change-significant-cfg.rs:19:1
2+
--> $DIR/svh-change-significant-cfg.rs:20:1
33
|
4-
19 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
4+
20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
55
| ^^^^^^^^^^^^^^^
66
|
77
= note: perhaps that crate needs to be recompiled?
88
= note: the following crate versions were found:
9-
crate `a`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/svh-change-significant-cfg.stage1-x86_64-pc-windows-gnu.aux/a.dll
10-
crate `b`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/svh-change-significant-cfg.stage1-x86_64-pc-windows-gnu.aux/b.dll
9+
crate `a`: $PATH_a
10+
crate `b`: $PATH_b
1111

1212
error: aborting due to previous error
1313

src/test/ui/svh-change-trait-bound.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// aux-build:svh-a-base.rs
1515
// aux-build:svh-b.rs
1616
// aux-build:svh-a-change-trait-bound.rs
17+
// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2"
1718

1819
extern crate a;
1920
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0460]: found possibly newer version of crate `a` which `b` depends on
2-
--> $DIR/svh-change-trait-bound.rs:19:1
2+
--> $DIR/svh-change-trait-bound.rs:20:1
33
|
4-
19 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
4+
20 | extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
55
| ^^^^^^^^^^^^^^^
66
|
77
= note: perhaps that crate needs to be recompiled?
88
= note: the following crate versions were found:
9-
crate `a`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/svh-change-trait-bound.stage1-x86_64-pc-windows-gnu.aux/a.dll
10-
crate `b`: /?/C:/msys64/home/we/rust/build/x86_64-pc-windows-gnu/test/ui/svh-change-trait-bound.stage1-x86_64-pc-windows-gnu.aux/b.dll
9+
crate `a`: $PATH_a
10+
crate `b`: $PATH_b
1111

1212
error: aborting due to previous error
1313

src/test/ui/svh-change-type-arg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// aux-build:svh-a-base.rs
1515
// aux-build:svh-b.rs
1616
// aux-build:svh-a-change-type-arg.rs
17+
// normalize-stderr-test: "(crate `(\w+)`:) .*" -> "$1 $$PATH_$2"
1718

1819
extern crate a;
1920
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on

0 commit comments

Comments
 (0)