Skip to content

Commit

Permalink
Auto merge of #5429 - matklad:dashes-test, r=matklad
Browse files Browse the repository at this point in the history
Extend dashes forwarding test

Closes #2213

Looks like this was fixed when we've transitioned to clap!
  • Loading branch information
bors committed Apr 28, 2018
2 parents c24a097 + 30e52ca commit 19962e2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/testsuite/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,26 +965,24 @@ fn dashes_are_forwarded() {
name = "foo"
version = "0.0.1"
authors = []
[[bin]]
name = "bar"
"#,
)
.file(
"src/main.rs",
"src/bin/bar.rs",
r#"
fn main() {
let s: Vec<String> = std::env::args().collect();
assert_eq!(s[1], "a");
assert_eq!(s[2], "--");
assert_eq!(s[3], "b");
assert_eq!(s[1], "--");
assert_eq!(s[2], "a");
assert_eq!(s[3], "--");
assert_eq!(s[4], "b");
}
"#,
)
.build();

assert_that(
p.cargo("run").arg("--").arg("a").arg("--").arg("b"),
p.cargo("run -- -- a -- b"),
execs().with_status(0),
);
}
Expand Down

0 comments on commit 19962e2

Please sign in to comment.