Closed
Description
For example the following setup:
// test/compiletest.rs
#[test]
fn ui() {
let t = trybuild::TestCases::new();
t.compile_fail("tests/ui/*.rs");
t.pass("tests/ui/ok.rs");
}
// tests/ui/fail.rs
fn main() {
let;
}
// tests/ui/ok.rs
fn main() {}
Currently trybuild would build ok.rs twice, expecting it to both pass and fail, which is nonsensical.
test tests/ui/fail.rs [should fail to compile] ... wip
NOTE: writing the following output to `wip/fail.stderr`.
Move this file to `tests/ui/fail.stderr` to accept it as correct.
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: expected pattern, found `;`
--> tests/ui/fail.rs:2:8
|
2 | let;
| ^ expected pattern
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
test tests/ui/ok.rs [should fail to compile] ... error
Expected test case to fail to compile, but it succeeded.
test tests/ui/ok.rs [should pass] ... ok
test ui ... FAILED
Instead the last glob that applies to a particular file should be the only one that takes effect.
Metadata
Metadata
Assignees
Labels
No labels
Activity