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 rustdoc;
mod rustflags; mod rustflags;
mod search; mod search;
mod shell_quoting;
mod small_fd_limits; mod small_fd_limits;
mod test; mod test;
mod tool_paths; mod tool_paths;

View File

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