Auto merge of #5680 - mikeyhew:fix-shell-quoting, r=alexcrichton

Fix the shell_quoting test

r? @alexcrichton

add-on to #5666
- Added `mod shell_quoting;` to testsuite/main.rs, so it actually runs
- fixed bugs in the test
This commit is contained in:
bors 2018-07-06 14:21:24 +00:00
commit 2a39e6c537
2 changed files with 9 additions and 8 deletions

View File

@ -87,6 +87,7 @@ mod rustdocflags;
mod rustdoc;
mod rustflags;
mod search;
mod shell_quoting;
mod small_fd_limits;
mod test;
mod tool_paths;

View File

@ -6,7 +6,7 @@ use cargotest::support::{
execs,
project,
};
use hamcrest::assert_that
use hamcrest::assert_that;
#[test]
fn features_are_quoted() {
@ -28,16 +28,16 @@ fn features_are_quoted() {
.build();
assert_that(
p.cargo("check -v"),
p.cargo("check -v")
.env("MSYSTEM", "1"),
execs()
.with_status(101)
.with_stderr_contains(
r#"\
[CHECKING] foo [..]
[RUNNING] `rustc [..] --cfg 'feature="default"' --cfg 'feature="some_feature"' [..]`
[ERROR] [..]
process didn't exit successfully: `rustc [..] --cfg 'feature="default"' --cfg 'feature="some_feature"' [..]`
"#
r#"[RUNNING] `rustc [..] --cfg 'feature="default"' --cfg 'feature="some_feature"' [..]`"#
).with_stderr_contains(
r#"
Caused by:
process didn't exit successfully: [..] --cfg 'feature="default"' --cfg 'feature="some_feature"' [..]"#
)
);
}