Skip to content

Commit

Permalink
Simplify tool_paths::absolute_tools test
Browse files Browse the repository at this point in the history
... by reusing the new [ROOT] macro.
  • Loading branch information
dwijnand committed Nov 18, 2018
1 parent 092f7ba commit dc6b5be
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/testsuite/tool_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ fn pathless_tools() {
#[test]
fn absolute_tools() {
let target = rustc_host();
let root = if cfg!(windows) { r#"C:\"# } else { "/" };

// Escaped as they appear within a TOML config file
let config = if cfg!(windows) {
Expand Down Expand Up @@ -62,14 +61,11 @@ fn absolute_tools() {
),
).build();

foo.cargo("build --verbose").with_stderr(&format!(
"\
foo.cargo("build --verbose").with_stderr("\
[COMPILING] foo v0.5.0 ([CWD])
[RUNNING] `rustc [..] -C ar={root}bogus/nonexistent-ar -C linker={root}bogus/nonexistent-linker [..]`
[RUNNING] `rustc [..] -C ar=[ROOT]bogus/nonexistent-ar -C linker=[ROOT]bogus/nonexistent-linker [..]`
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
root = root,
)).run();
").run();
}

#[test]
Expand Down

0 comments on commit dc6b5be

Please sign in to comment.