-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// The way test suites run can be modified using configuration flags, | ||
// ignoring certain tests while running others. This test contains two | ||
// functions, one which must run and the other which must not. The standard | ||
// output is checked to verify that the ignore configuration is doing its job, | ||
// and that output is successfully minimized with the --quiet flag. | ||
// See https://github.com/rust-lang/rust/commit/f7ebe23ae185991b0fee05b32fbb3e29b89a41bf | ||
|
||
//@ ignore-cross-compile | ||
// Reason: the compiled binary is executed | ||
|
||
use run_make_support::{run, run_with_args, rustc}; | ||
|
||
fn main() { | ||
rustc().arg("--test").input("test-ignore-cfg.rs").cfg("ignorecfg").run(); | ||
// check that #[cfg_attr(..., ignore)] does the right thing. | ||
run("test-ignore-cfg") | ||
.assert_stdout_contains("shouldnotignore ... ok") | ||
.assert_stdout_contains("shouldignore ... ignored"); | ||
run_with_args("test-ignore-cfg", &["--quiet"]).assert_stdout_contains("i."); | ||
run_with_args("test-ignore-cfg", &["--quiet"]).assert_stdout_not_contains("should"); | ||
} |