diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index 86e5d34b7..5137317f9 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -155,7 +155,7 @@ fn bad_cargo_config_jobs() { p.cargo("build").arg("-v"), execs().with_status(101).with_stderr( "\ -[ERROR] error in [..].cargo[/]config: \ +[ERROR] error in [..].cargo/config: \ could not load config key `build.jobs`: \ invalid value: integer `-1`, expected u32 ", diff --git a/tests/testsuite/bench.rs b/tests/testsuite/bench.rs index 61f4c18ea..9306ce261 100644 --- a/tests/testsuite/bench.rs +++ b/tests/testsuite/bench.rs @@ -48,7 +48,7 @@ fn cargo_bench_simple() { "\ [COMPILING] foo v0.5.0 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test bench_hello ... bench: [..]"), @@ -95,8 +95,8 @@ fn bench_bench_implicit() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]release[/]deps[/]mybench-[..][EXE] +[RUNNING] target/release/deps/foo-[..][EXE] +[RUNNING] target/release/deps/mybench-[..][EXE] ", dir = p.url() )) @@ -144,7 +144,7 @@ fn bench_bin_implicit() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE] +[RUNNING] target/release/deps/foo-[..][EXE] ", dir = p.url() )) @@ -183,7 +183,7 @@ fn bench_tarname() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]bin2-[..][EXE] +[RUNNING] target/release/deps/bin2-[..][EXE] ", dir = p.url() )) @@ -261,9 +261,9 @@ fn cargo_bench_verbose() { .with_stderr(&format!( "\ [COMPILING] foo v0.5.0 ({url}) -[RUNNING] `rustc [..] src[/]main.rs [..]` +[RUNNING] `rustc [..] src/main.rs [..]` [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `[..]target[/]release[/]deps[/]foo-[..][EXE] hello --bench`", +[RUNNING] `[..]target/release/deps/foo-[..][EXE] hello --bench`", url = p.url() )) .with_stdout_contains("test bench_hello ... bench: [..]"), @@ -372,7 +372,7 @@ fn cargo_bench_failing_test() { "\ [COMPILING] foo v0.5.0 ({})[..] [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_either_contains( @@ -380,7 +380,7 @@ fn cargo_bench_failing_test() { ) .with_either_contains("[..]left: `\"hello\"`[..]") .with_either_contains("[..]right: `\"nope\"`[..]") - .with_either_contains("[..]src[/]main.rs:15[..]") + .with_either_contains("[..]src/main.rs:15[..]") .with_status(101), ); } @@ -447,8 +447,8 @@ fn bench_with_lib_dep() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]release[/]deps[/]baz-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE] +[RUNNING] target/release/deps/baz-[..][EXE]", p.url() )) .with_stdout_contains("test lib_bench ... bench: [..]") @@ -515,7 +515,7 @@ fn bench_with_deep_lib_dep() { [COMPILING] foo v0.0.1 ([..]) [COMPILING] bar v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]bar-[..][EXE]", +[RUNNING] target/release/deps/bar-[..][EXE]", dir = p.url() )) .with_stdout_contains("test bar_bench ... bench: [..]"), @@ -575,8 +575,8 @@ fn external_bench_explicit() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]release[/]deps[/]bench-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE] +[RUNNING] target/release/deps/bench-[..][EXE]", p.url() )) .with_stdout_contains("test internal_bench ... bench: [..]") @@ -625,8 +625,8 @@ fn external_bench_implicit() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]release[/]deps[/]external-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE] +[RUNNING] target/release/deps/external-[..][EXE]", p.url() )) .with_stdout_contains("test internal_bench ... bench: [..]") @@ -707,7 +707,7 @@ For more information on this warning you can consult https://github.com/rust-lang/cargo/issues/5330 [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE] +[RUNNING] target/release/deps/foo-[..][EXE] ", p.url() )), @@ -758,7 +758,7 @@ fn pass_through_command_line() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", dir = p.url() )) .with_stdout_contains("test bar ... bench: [..]"), @@ -770,7 +770,7 @@ fn pass_through_command_line() { .with_status(0) .with_stderr( "[FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", ) .with_stdout_contains("test foo ... bench: [..]"), ); @@ -859,8 +859,8 @@ fn lib_bin_same_name() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE] +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains_n("test [..] ... bench: [..]", 2), @@ -912,8 +912,8 @@ fn lib_with_standard_name() { "\ [COMPILING] syntax v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]syntax-[..][EXE] -[RUNNING] target[/]release[/]deps[/]bench-[..][EXE]", +[RUNNING] target/release/deps/syntax-[..][EXE] +[RUNNING] target/release/deps/bench-[..][EXE]", dir = p.url() )) .with_stdout_contains("test foo_bench ... bench: [..]") @@ -968,7 +968,7 @@ fn lib_with_standard_name2() { "\ [COMPILING] syntax v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]syntax-[..][EXE]", +[RUNNING] target/release/deps/syntax-[..][EXE]", dir = p.url() )) .with_stdout_contains("test bench ... bench: [..]"), @@ -1052,8 +1052,8 @@ fn bench_dylib() { [RUNNING] [..] -C opt-level=3 [..] [RUNNING] [..] -C opt-level=3 [..] [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `[..]target[/]release[/]deps[/]foo-[..][EXE] --bench` -[RUNNING] `[..]target[/]release[/]deps[/]bench-[..][EXE] --bench`", +[RUNNING] `[..]target/release/deps/foo-[..][EXE] --bench` +[RUNNING] `[..]target/release/deps/bench-[..][EXE] --bench`", dir = p.url() )) .with_stdout_contains_n("test foo ... bench: [..]", 2), @@ -1069,8 +1069,8 @@ fn bench_dylib() { [FRESH] bar v0.0.1 ({dir}/bar) [FRESH] foo v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `[..]target[/]release[/]deps[/]foo-[..][EXE] --bench` -[RUNNING] `[..]target[/]release[/]deps[/]bench-[..][EXE] --bench`", +[RUNNING] `[..]target/release/deps/foo-[..][EXE] --bench` +[RUNNING] `[..]target/release/deps/bench-[..][EXE] --bench`", dir = p.url() )) .with_stdout_contains_n("test foo ... bench: [..]", 2), @@ -1115,7 +1115,7 @@ fn bench_twice_with_build_cmd() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", dir = p.url() )) .with_stdout_contains("test foo ... bench: [..]"), @@ -1127,7 +1127,7 @@ fn bench_twice_with_build_cmd() { .with_status(0) .with_stderr( "[FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", ) .with_stdout_contains("test foo ... bench: [..]"), ); @@ -1215,8 +1215,8 @@ fn bench_with_examples() { [RUNNING] `rustc [..]` [RUNNING] `rustc [..]` [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `{dir}[/]target[/]release[/]deps[/]foo-[..][EXE] --bench` -[RUNNING] `{dir}[/]target[/]release[/]deps[/]testb1-[..][EXE] --bench`", +[RUNNING] `{dir}/target/release/deps/foo-[..][EXE] --bench` +[RUNNING] `{dir}/target/release/deps/testb1-[..][EXE] --bench`", dir = p.root().display(), url = p.url() )) @@ -1262,7 +1262,7 @@ fn test_a_bench() { "\ [COMPILING] foo v0.1.0 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]b-[..][EXE]", +[RUNNING] target/debug/deps/b-[..][EXE]", ) .with_stdout_contains("test foo ... ok"), ); @@ -1343,9 +1343,9 @@ fn test_bench_no_fail_fast() { .arg("--test-threads=1"), execs() .with_status(101) - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]") .with_stdout_contains("running 2 tests") - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]") .with_stdout_contains("test bench_hello [..]") .with_stdout_contains("test bench_nope [..]"), ); @@ -1438,9 +1438,9 @@ fn test_bench_multiple_packages() { p.cargo("bench").arg("-p").arg("bar").arg("-p").arg("baz"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]bbaz-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/bbaz-[..][EXE]") .with_stdout_contains("test bench_baz ... bench: [..]") - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]bbar-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/bbar-[..][EXE]") .with_stdout_contains("test bench_bar ... bench: [..]"), ); } @@ -1498,9 +1498,9 @@ fn bench_all_workspace() { p.cargo("bench").arg("--all"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]bar-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]") .with_stdout_contains("test bench_bar ... bench: [..]") - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/foo-[..][EXE]") .with_stdout_contains("test bench_foo ... bench: [..]"), ); } @@ -1601,9 +1601,9 @@ fn bench_all_virtual_manifest() { p.cargo("bench").arg("--all"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]baz-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/baz-[..][EXE]") .with_stdout_contains("test bench_baz ... bench: [..]") - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]bar-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]") .with_stdout_contains("test bench_bar ... bench: [..]"), ); } @@ -1646,7 +1646,7 @@ fn legacy_bench_name() { p.cargo("bench"), execs().with_status(0).with_stderr_contains( "\ -[WARNING] path `[..]src[/]bench.rs` was erroneously implicitly accepted for benchmark `bench`, +[WARNING] path `[..]src/bench.rs` was erroneously implicitly accepted for benchmark `bench`, please set bench.path in Cargo.toml", ), ); @@ -1698,9 +1698,9 @@ fn bench_virtual_manifest_all_implied() { p.cargo("bench"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]baz-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/baz-[..][EXE]") .with_stdout_contains("test bench_baz ... bench: [..]") - .with_stderr_contains("[RUNNING] target[/]release[/]deps[/]bar-[..][EXE]") + .with_stderr_contains("[RUNNING] target/release/deps/bar-[..][EXE]") .with_stdout_contains("test bench_bar ... bench: [..]"), ); } diff --git a/tests/testsuite/build.rs b/tests/testsuite/build.rs index c0ce96f06..28355c1c4 100644 --- a/tests/testsuite/build.rs +++ b/tests/testsuite/build.rs @@ -55,7 +55,7 @@ fn cargo_compile_incremental() { p.cargo("build").arg("-v").env("CARGO_INCREMENTAL", "1"), execs() .with_stderr_contains( - "[RUNNING] `rustc [..] -C incremental=[..][/]target[/]debug[/]incremental[..]`\n", + "[RUNNING] `rustc [..] -C incremental=[..]/target/debug/incremental[..]`\n", ) .with_status(0), ); @@ -64,7 +64,7 @@ fn cargo_compile_incremental() { p.cargo("test").arg("-v").env("CARGO_INCREMENTAL", "1"), execs() .with_stderr_contains( - "[RUNNING] `rustc [..] -C incremental=[..][/]target[/]debug[/]incremental[..]`\n", + "[RUNNING] `rustc [..] -C incremental=[..]/target/debug/incremental[..]`\n", ) .with_status(0), ); @@ -1403,20 +1403,20 @@ fn cargo_default_env_metadata_env_var() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] bar v0.0.1 ({url}/bar) -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type dylib \ +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type dylib \ --emit=dep-info,link \ -C prefer-dynamic -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ -C extra-filename=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps \ - --extern bar={dir}[/]target[/]debug[/]deps[/]{prefix}bar{suffix}` + -L dependency={dir}/target/debug/deps \ + --extern bar={dir}/target/debug/deps/{prefix}bar{suffix}` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]", dir = p.root().display(), url = p.url(), @@ -1435,20 +1435,20 @@ fn cargo_default_env_metadata_env_var() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] bar v0.0.1 ({url}/bar) -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type dylib \ +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type dylib \ --emit=dep-info,link \ -C prefer-dynamic -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ -C extra-filename=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps \ - --extern bar={dir}[/]target[/]debug[/]deps[/]{prefix}bar-[..]{suffix}` + -L dependency={dir}/target/debug/deps \ + --extern bar={dir}/target/debug/deps/{prefix}bar-[..]{suffix}` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -1663,7 +1663,7 @@ fn many_crate_types_old_style_lib_location() { p.cargo("build"), execs().with_status(0).with_stderr_contains( "\ -[WARNING] path `[..]src[/]foo.rs` was erroneously implicitly accepted for library `foo`, +[WARNING] path `[..]src/foo.rs` was erroneously implicitly accepted for library `foo`, please rename the file to `src/lib.rs` or set lib.path in Cargo.toml", ), ); @@ -1799,13 +1799,13 @@ fn lto_build() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc --crate-name test src[/]main.rs --crate-type bin \ +[RUNNING] `rustc --crate-name test src/main.rs --crate-type bin \ --emit=dep-info,link \ -C opt-level=3 \ -C lto \ -C metadata=[..] \ - --out-dir {dir}[/]target[/]release[/]deps \ - -L dependency={dir}[/]target[/]release[/]deps` + --out-dir {dir}/target/release/deps \ + -L dependency={dir}/target/release/deps` [FINISHED] release [optimized] target(s) in [..] ", dir = p.root().display(), @@ -1824,11 +1824,11 @@ fn verbose_build() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -1847,12 +1847,12 @@ fn verbose_release_build() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link \ -C opt-level=3 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]release[/]deps` + -L dependency={dir}/target/release/deps` [FINISHED] release [optimized] target(s) in [..] ", dir = p.root().display(), @@ -1899,23 +1899,23 @@ fn verbose_release_build_deps() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] foo v0.0.0 ({url}/foo) -[RUNNING] `rustc --crate-name foo foo[/]src[/]lib.rs \ +[RUNNING] `rustc --crate-name foo foo/src/lib.rs \ --crate-type dylib --crate-type rlib \ --emit=dep-info,link \ -C prefer-dynamic \ -C opt-level=3 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]release[/]deps` + -L dependency={dir}/target/release/deps` [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name test src/lib.rs --crate-type lib \ --emit=dep-info,link \ -C opt-level=3 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]release[/]deps \ - --extern foo={dir}[/]target[/]release[/]deps[/]{prefix}foo{suffix} \ - --extern foo={dir}[/]target[/]release[/]deps[/]libfoo.rlib` + -L dependency={dir}/target/release/deps \ + --extern foo={dir}/target/release/deps/{prefix}foo{suffix} \ + --extern foo={dir}/target/release/deps/libfoo.rlib` [FINISHED] release [optimized] target(s) in [..] ", dir = p.root().display(), @@ -2062,7 +2062,7 @@ fn legacy_binary_paths_warnings() { p.cargo("build").arg("-v"), execs().with_status(0).with_stderr_contains( "\ -[WARNING] path `[..]src[/]main.rs` was erroneously implicitly accepted for binary `bar`, +[WARNING] path `[..]src/main.rs` was erroneously implicitly accepted for binary `bar`, please set bin.path in Cargo.toml", ), ); @@ -2088,7 +2088,7 @@ please set bin.path in Cargo.toml", p.cargo("build").arg("-v"), execs().with_status(0).with_stderr_contains( "\ -[WARNING] path `[..]src[/]bin[/]main.rs` was erroneously implicitly accepted for binary `bar`, +[WARNING] path `[..]src/bin/main.rs` was erroneously implicitly accepted for binary `bar`, please set bin.path in Cargo.toml", ), ); @@ -2113,7 +2113,7 @@ please set bin.path in Cargo.toml", p.cargo("build").arg("-v"), execs().with_status(0).with_stderr_contains( "\ -[WARNING] path `[..]src[/]bar.rs` was erroneously implicitly accepted for binary `bar`, +[WARNING] path `[..]src/bar.rs` was erroneously implicitly accepted for binary `bar`, please set bin.path in Cargo.toml", ), ); @@ -3349,7 +3349,7 @@ fn explicit_color_config_is_propagated_to_rustc() { p.cargo("build").arg("-v").arg("--color").arg("always"), execs() .with_status(0) - .with_stderr_contains("[..]rustc [..] src[/]lib.rs --color always[..]"), + .with_stderr_contains("[..]rustc [..] src/lib.rs --color always[..]"), ); assert_that(p.cargo("clean"), execs().with_status(0)); @@ -4625,12 +4625,12 @@ fn build_filter_infer_profile() { .with_status(0) .with_stderr_contains( "\ - [RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ + [RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link[..]", ) .with_stderr_contains( "\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]", ), ); @@ -4642,15 +4642,15 @@ fn build_filter_infer_profile() { .with_status(0) .with_stderr_contains( "\ - [RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ + [RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link[..]", ) .with_stderr_contains( - "[RUNNING] `rustc --crate-name t1 tests[/]t1.rs --emit=dep-info,link[..]", + "[RUNNING] `rustc --crate-name t1 tests/t1.rs --emit=dep-info,link[..]", ) .with_stderr_contains( "\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]", ), ); @@ -4662,17 +4662,17 @@ fn build_filter_infer_profile() { .with_status(0) .with_stderr_contains( "\ - [RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ + [RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link[..]", ) .with_stderr_contains( "\ - [RUNNING] `rustc --crate-name b1 benches[/]b1.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name b1 benches/b1.rs --emit=dep-info,link \ -C opt-level=3[..]", ) .with_stderr_contains( "\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]", ), ); @@ -4688,15 +4688,15 @@ fn targets_selected_default() { execs().with_status(0) // bin .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]") // bench .with_stderr_does_not_contain("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C opt-level=3 --test [..]") // unit test .with_stderr_does_not_contain("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C debuginfo=2 --test [..]"), ); } @@ -4711,15 +4711,15 @@ fn targets_selected_all() { execs().with_status(0) // bin .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]") // bench .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C opt-level=3 --test [..]") // unit test .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C debuginfo=2 --test [..]"), ); } @@ -4734,15 +4734,15 @@ fn all_targets_no_lib() { execs().with_status(0) // bin .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]") // bench .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C opt-level=3 --test [..]") // unit test .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C debuginfo=2 --test [..]"), ); } diff --git a/tests/testsuite/build_lib.rs b/tests/testsuite/build_lib.rs index 213ac9cc1..0b38d8300 100644 --- a/tests/testsuite/build_lib.rs +++ b/tests/testsuite/build_lib.rs @@ -5,11 +5,11 @@ fn verbose_output_for_lib(p: &Project) -> String { format!( "\ [COMPILING] {name} v{version} ({url}) -[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name {name} src/lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), diff --git a/tests/testsuite/build_plan.rs b/tests/testsuite/build_plan.rs index f266e726c..afe474429 100644 --- a/tests/testsuite/build_plan.rs +++ b/tests/testsuite/build_plan.rs @@ -18,12 +18,12 @@ fn cargo_build_plan_simple() { r#" { "inputs": [ - "[..][/]foo[/]Cargo.toml" + "[..]/foo/Cargo.toml" ], "invocations": [ { "args": "{...}", - "cwd": "[..][/]cit[/][..][/]foo", + "cwd": "[..]/cit/[..]/foo", "deps": [], "env": "{...}", "kind": "Host", @@ -79,19 +79,19 @@ fn cargo_build_plan_single_dep() { r#" { "inputs": [ - "[..][/]foo[/]Cargo.toml", - "[..][/]foo[/]bar[/]Cargo.toml" + "[..]/foo/Cargo.toml", + "[..]/foo/bar/Cargo.toml" ], "invocations": [ { "args": "{...}", - "cwd": "[..][/]cit[/][..][/]foo", + "cwd": "[..]/cit/[..]/foo", "deps": [], "env": "{...}", "kind": "Host", "links": "{...}", "outputs": [ - "[..][/]foo[/]target[/]debug[/]deps[/]libbar-[..].rlib" + "[..]/foo/target/debug/deps/libbar-[..].rlib" ], "package_name": "bar", "package_version": "0.0.1", @@ -100,13 +100,13 @@ fn cargo_build_plan_single_dep() { }, { "args": "{...}", - "cwd": "[..][/]cit[/][..][/]foo", + "cwd": "[..]/cit/[..]/foo", "deps": [0], "env": "{...}", "kind": "Host", "links": "{...}", "outputs": [ - "[..][/]foo[/]target[/]debug[/]deps[/]libfoo-[..].rlib" + "[..]/foo/target/debug/deps/libfoo-[..].rlib" ], "package_name": "foo", "package_version": "0.5.0", @@ -147,18 +147,18 @@ fn cargo_build_plan_build_script() { r#" { "inputs": [ - "[..][/]foo[/]Cargo.toml" + "[..]/foo/Cargo.toml" ], "invocations": [ { "args": "{...}", - "cwd": "[..][/]cit[/][..][/]foo", + "cwd": "[..]/cit/[..]/foo", "deps": [], "env": "{...}", "kind": "Host", "links": "{...}", "outputs": [ - "[..][/]foo[/]target[/]debug[/]build[/][..][/]build_script_build-[..]" + "[..]/foo/target/debug/build/[..]/build_script_build-[..]" ], "package_name": "foo", "package_version": "0.5.0", @@ -167,7 +167,7 @@ fn cargo_build_plan_build_script() { }, { "args": "{...}", - "cwd": "[..][/]cit[/][..][/]foo", + "cwd": "[..]/cit/[..]/foo", "deps": [0], "env": "{...}", "kind": "Host", @@ -175,12 +175,12 @@ fn cargo_build_plan_build_script() { "outputs": [], "package_name": "foo", "package_version": "0.5.0", - "program": "[..][/]build-script-build", + "program": "[..]/build-script-build", "target_kind": ["custom-build"] }, { "args": "{...}", - "cwd": "[..][/]cit[/][..][/]foo", + "cwd": "[..]/cit/[..]/foo", "deps": [1], "env": "{...}", "kind": "Host", diff --git a/tests/testsuite/build_script.rs b/tests/testsuite/build_script.rs index 0e84b8445..c4e57283b 100644 --- a/tests/testsuite/build_script.rs +++ b/tests/testsuite/build_script.rs @@ -36,9 +36,9 @@ fn custom_build_script_failed() { "\ [COMPILING] foo v0.5.0 ({url}) [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin [..]` -[RUNNING] `[..][/]build-script-build` +[RUNNING] `[..]/build-script-build` [ERROR] failed to run custom build command for `foo v0.5.0 ({url})` -process didn't exit successfully: `[..][/]build-script-build` (exit code: 101)", +process didn't exit successfully: `[..]/build-script-build` (exit code: 101)", url = p.url() )), ); @@ -586,7 +586,7 @@ fn only_rerun_build_script() { execs().with_status(0).with_stderr( "\ [COMPILING] foo v0.5.0 (file://[..]) -[RUNNING] `[..][/]build-script-build` +[RUNNING] `[..]/build-script-build` [RUNNING] `rustc --crate-name foo [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", @@ -694,11 +694,11 @@ fn testing_and_such() { .with_stderr( "\ [COMPILING] foo v0.5.0 (file://[..]) -[RUNNING] `[..][/]build-script-build` +[RUNNING] `[..]/build-script-build` [RUNNING] `rustc --crate-name foo [..]` [RUNNING] `rustc --crate-name foo [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..][/]foo-[..][EXE]` +[RUNNING] `[..]/foo-[..][EXE]` [DOCTEST] foo [RUNNING] `rustdoc --test [..]`", ) @@ -728,7 +728,7 @@ fn testing_and_such() { "\ [COMPILING] foo v0.5.0 (file://[..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]foo[EXE]` +[RUNNING] `target/debug/foo[EXE]` ", ), ); @@ -915,7 +915,7 @@ fn build_deps_simple() { [RUNNING] `rustc --crate-name a [..]` [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `rustc [..] build.rs [..] --extern a=[..]` -[RUNNING] `[..][/]foo-[..][/]build-script-build` +[RUNNING] `[..]/foo-[..]/build-script-build` [RUNNING] `rustc --crate-name foo [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", @@ -1025,25 +1025,25 @@ fn build_cmd_with_a_build_cmd() { [COMPILING] b v0.5.0 (file://[..]) [RUNNING] `rustc --crate-name b [..]` [COMPILING] a v0.5.0 (file://[..]) -[RUNNING] `rustc [..] a[/]build.rs [..] --extern b=[..]` -[RUNNING] `[..][/]a-[..][/]build-script-build` +[RUNNING] `rustc [..] a/build.rs [..] --extern b=[..]` +[RUNNING] `[..]/a-[..]/build-script-build` [RUNNING] `rustc --crate-name a [..]lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ - --out-dir [..]target[/]debug[/]deps \ - -L [..]target[/]debug[/]deps` + --out-dir [..]target/debug/deps \ + -L [..]target/debug/deps` [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin \ --emit=dep-info,link \ -C debuginfo=2 -C metadata=[..] --out-dir [..] \ - -L [..]target[/]debug[/]deps \ + -L [..]target/debug/deps \ --extern a=[..]liba[..].rlib` -[RUNNING] `[..][/]foo-[..][/]build-script-build` +[RUNNING] `[..]/foo-[..]/build-script-build` [RUNNING] `rustc --crate-name foo [..]lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L [..]target[/]debug[/]deps` + -L [..]target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -1137,7 +1137,7 @@ fn output_separate_lines() { "\ [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `rustc [..] build.rs [..]` -[RUNNING] `[..][/]foo-[..][/]build-script-build` +[RUNNING] `[..]/foo-[..]/build-script-build` [RUNNING] `rustc --crate-name foo [..] -L foo -l static=foo` [ERROR] could not find native static library [..] ", @@ -1175,7 +1175,7 @@ fn output_separate_lines_new() { "\ [COMPILING] foo v0.5.0 (file://[..]) [RUNNING] `rustc [..] build.rs [..]` -[RUNNING] `[..][/]foo-[..][/]build-script-build` +[RUNNING] `[..]/foo-[..]/build-script-build` [RUNNING] `rustc --crate-name foo [..] -L foo -l static=foo` [ERROR] could not find native static library [..] ", @@ -1236,7 +1236,7 @@ fn code_generation() { "\ [COMPILING] foo v0.5.0 (file://[..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]foo`", +[RUNNING] `target/debug/foo`", ) .with_stdout("Hello, World!"), ); @@ -1800,13 +1800,13 @@ fn cfg_test() { "\ [COMPILING] foo v0.0.1 ({dir}) [RUNNING] [..] build.rs [..] -[RUNNING] `[..][/]build-script-build` +[RUNNING] `[..]/build-script-build` [RUNNING] [..] --cfg foo[..] [RUNNING] [..] --cfg foo[..] [RUNNING] [..] --cfg foo[..] [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..][/]foo-[..][EXE]` -[RUNNING] `[..][/]test-[..][EXE]` +[RUNNING] `[..]/foo-[..][EXE]` +[RUNNING] `[..]/test-[..][EXE]` [DOCTEST] foo [RUNNING] [..] --cfg foo[..]", dir = p.url() @@ -1919,8 +1919,8 @@ fn cfg_override_test() { [RUNNING] `[..]` [RUNNING] `[..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..][/]foo-[..][EXE]` -[RUNNING] `[..][/]test-[..][EXE]` +[RUNNING] `[..]/foo-[..][EXE]` +[RUNNING] `[..]/test-[..][EXE]` [DOCTEST] foo [RUNNING] [..] --cfg foo[..]", dir = p.url() @@ -2053,13 +2053,13 @@ fn env_test() { "\ [COMPILING] foo v0.0.1 ({dir}) [RUNNING] [..] build.rs [..] -[RUNNING] `[..][/]build-script-build` +[RUNNING] `[..]/build-script-build` [RUNNING] [..] --crate-name foo[..] [RUNNING] [..] --crate-name foo[..] [RUNNING] [..] --crate-name test[..] [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..][/]foo-[..][EXE]` -[RUNNING] `[..][/]test-[..][EXE]` +[RUNNING] `[..]/foo-[..][EXE]` +[RUNNING] `[..]/test-[..][EXE]` [DOCTEST] foo [RUNNING] [..] --crate-name foo[..]", dir = p.url() @@ -2152,16 +2152,16 @@ fn flags_go_into_tests() { .with_stderr( "\ [COMPILING] a v0.5.0 ([..] -[RUNNING] `rustc [..] a[/]build.rs [..]` -[RUNNING] `[..][/]build-script-build` -[RUNNING] `rustc [..] a[/]src[/]lib.rs [..] -L test[..]` +[RUNNING] `rustc [..] a/build.rs [..]` +[RUNNING] `[..]/build-script-build` +[RUNNING] `rustc [..] a/src/lib.rs [..] -L test[..]` [COMPILING] b v0.5.0 ([..] -[RUNNING] `rustc [..] b[/]src[/]lib.rs [..] -L test[..]` +[RUNNING] `rustc [..] b/src/lib.rs [..] -L test[..]` [COMPILING] foo v0.5.0 ([..] -[RUNNING] `rustc [..] src[/]lib.rs [..] -L test[..]` -[RUNNING] `rustc [..] tests[/]foo.rs [..] -L test[..]` +[RUNNING] `rustc [..] src/lib.rs [..] -L test[..]` +[RUNNING] `rustc [..] tests/foo.rs [..] -L test[..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..][/]foo-[..][EXE]`", +[RUNNING] `[..]/foo-[..][EXE]`", ) .with_stdout_contains("running 0 tests"), ); @@ -2174,9 +2174,9 @@ fn flags_go_into_tests() { "\ [FRESH] a v0.5.0 ([..] [COMPILING] b v0.5.0 ([..] -[RUNNING] `rustc [..] b[/]src[/]lib.rs [..] -L test[..]` +[RUNNING] `rustc [..] b/src/lib.rs [..] -L test[..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..][/]b-[..][EXE]`", +[RUNNING] `[..]/b-[..][EXE]`", ) .with_stdout_contains("running 0 tests"), ); @@ -2544,8 +2544,8 @@ fn rebuild_only_on_explicit_paths() { execs().with_status(0).with_stderr( "\ [COMPILING] foo v0.5.0 ([..]) -[RUNNING] `[..][/]build-script-build` -[RUNNING] `rustc [..] src[/]lib.rs [..]` +[RUNNING] `[..]/build-script-build` +[RUNNING] `rustc [..] src/lib.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -2562,8 +2562,8 @@ fn rebuild_only_on_explicit_paths() { execs().with_status(0).with_stderr( "\ [COMPILING] foo v0.5.0 ([..]) -[RUNNING] `[..][/]build-script-build` -[RUNNING] `rustc [..] src[/]lib.rs [..]` +[RUNNING] `[..]/build-script-build` +[RUNNING] `rustc [..] src/lib.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -2603,8 +2603,8 @@ fn rebuild_only_on_explicit_paths() { execs().with_status(0).with_stderr( "\ [COMPILING] foo v0.5.0 ([..]) -[RUNNING] `[..][/]build-script-build` -[RUNNING] `rustc [..] src[/]lib.rs [..]` +[RUNNING] `[..]/build-script-build` +[RUNNING] `rustc [..] src/lib.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -2618,8 +2618,8 @@ fn rebuild_only_on_explicit_paths() { execs().with_status(0).with_stderr( "\ [COMPILING] foo v0.5.0 ([..]) -[RUNNING] `[..][/]build-script-build` -[RUNNING] `rustc [..] src[/]lib.rs [..]` +[RUNNING] `[..]/build-script-build` +[RUNNING] `rustc [..] src/lib.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), diff --git a/tests/testsuite/check.rs b/tests/testsuite/check.rs index 153b3210d..86ddd7894 100644 --- a/tests/testsuite/check.rs +++ b/tests/testsuite/check.rs @@ -389,10 +389,10 @@ fn check_all() { p.cargo("check").arg("--all").arg("-v"), execs() .with_status(0) - .with_stderr_contains("[..] --crate-name foo src[/]lib.rs [..]") - .with_stderr_contains("[..] --crate-name foo src[/]main.rs [..]") - .with_stderr_contains("[..] --crate-name b b[/]src[/]lib.rs [..]") - .with_stderr_contains("[..] --crate-name b b[/]src[/]main.rs [..]"), + .with_stderr_contains("[..] --crate-name foo src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name foo src/main.rs [..]") + .with_stderr_contains("[..] --crate-name b b/src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name b b/src/main.rs [..]"), ); } @@ -416,8 +416,8 @@ fn check_virtual_all_implied() { p.cargo("check").arg("-v"), execs() .with_status(0) - .with_stderr_contains("[..] --crate-name bar bar[/]src[/]lib.rs [..]") - .with_stderr_contains("[..] --crate-name baz baz[/]src[/]lib.rs [..]"), + .with_stderr_contains("[..] --crate-name bar bar/src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name baz baz/src/lib.rs [..]"), ); } @@ -435,11 +435,11 @@ fn targets_selected_default() { foo.cargo("check").arg("-v"), execs() .with_status(0) - .with_stderr_contains("[..] --crate-name foo src[/]lib.rs [..]") - .with_stderr_contains("[..] --crate-name foo src[/]main.rs [..]") - .with_stderr_does_not_contain("[..] --crate-name example1 examples[/]example1.rs [..]") - .with_stderr_does_not_contain("[..] --crate-name test2 tests[/]test2.rs [..]") - .with_stderr_does_not_contain("[..] --crate-name bench3 benches[/]bench3.rs [..]"), + .with_stderr_contains("[..] --crate-name foo src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name foo src/main.rs [..]") + .with_stderr_does_not_contain("[..] --crate-name example1 examples/example1.rs [..]") + .with_stderr_does_not_contain("[..] --crate-name test2 tests/test2.rs [..]") + .with_stderr_does_not_contain("[..] --crate-name bench3 benches/bench3.rs [..]"), ); } @@ -457,11 +457,11 @@ fn targets_selected_all() { foo.cargo("check").arg("--all-targets").arg("-v"), execs() .with_status(0) - .with_stderr_contains("[..] --crate-name foo src[/]lib.rs [..]") - .with_stderr_contains("[..] --crate-name foo src[/]main.rs [..]") - .with_stderr_contains("[..] --crate-name example1 examples[/]example1.rs [..]") - .with_stderr_contains("[..] --crate-name test2 tests[/]test2.rs [..]") - .with_stderr_contains("[..] --crate-name bench3 benches[/]bench3.rs [..]"), + .with_stderr_contains("[..] --crate-name foo src/lib.rs [..]") + .with_stderr_contains("[..] --crate-name foo src/main.rs [..]") + .with_stderr_contains("[..] --crate-name example1 examples/example1.rs [..]") + .with_stderr_contains("[..] --crate-name test2 tests/test2.rs [..]") + .with_stderr_contains("[..] --crate-name bench3 benches/bench3.rs [..]"), ); } @@ -565,9 +565,9 @@ fn check_filters() { p.cargo("check").arg("--tests").arg("-v"), execs() .with_status(0) - .with_stderr_contains("[..] --crate-name foo src[/]lib.rs [..] --test [..]") - .with_stderr_contains("[..] --crate-name foo src[/]lib.rs --crate-type lib [..]") - .with_stderr_contains("[..] --crate-name foo src[/]main.rs [..] --test [..]") + .with_stderr_contains("[..] --crate-name foo src/lib.rs [..] --test [..]") + .with_stderr_contains("[..] --crate-name foo src/lib.rs --crate-type lib [..]") + .with_stderr_contains("[..] --crate-name foo src/main.rs [..] --test [..]") .with_stderr_contains("[..]unused_unit_lib[..]") .with_stderr_contains("[..]unused_unit_bin[..]") .with_stderr_contains("[..]unused_normal_lib[..]") diff --git a/tests/testsuite/clean.rs b/tests/testsuite/clean.rs index c07436e0a..cddd3365a 100644 --- a/tests/testsuite/clean.rs +++ b/tests/testsuite/clean.rs @@ -208,7 +208,7 @@ fn build_script() { [COMPILING] foo v0.0.1 ([..]) [RUNNING] `rustc [..] build.rs [..]` [RUNNING] `[..]build-script-build` -[RUNNING] `rustc [..] src[/]main.rs [..]` +[RUNNING] `rustc [..] src/main.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), diff --git a/tests/testsuite/config.rs b/tests/testsuite/config.rs index 9bb87498d..5c620f6c1 100644 --- a/tests/testsuite/config.rs +++ b/tests/testsuite/config.rs @@ -132,7 +132,7 @@ unused = 456 let path = paths::root().join("shell.out"); let output = fs::read_to_string(path).unwrap(); let expected = "\ -warning: unused key `S.unused` in config file `[..][/].cargo[/]config` +warning: unused key `S.unused` in config file `[..]/.cargo/config` "; if !lines_match(expected, &output) { panic!( @@ -294,7 +294,7 @@ opt-level = 'foo' assert_error( config.get::("profile.dev").unwrap_err(), - "error in [..][/].cargo[/]config: \ + "error in [..]/.cargo/config: \ could not load config key `profile.dev.opt-level`: \ must be an integer, `z`, or `s`, but found: foo", ); @@ -367,11 +367,11 @@ big = 123456789 ); assert_error( config.get::("S.f2").unwrap_err(), - "error in [..][/].cargo[/]config: `S.f2` expected an integer, but found a string", + "error in [..]/.cargo/config: `S.f2` expected an integer, but found a string", ); assert_error( config.get::("S.big").unwrap_err(), - "error in [..].cargo[/]config: could not load config key `S.big`: \ + "error in [..].cargo/config: could not load config key `S.big`: \ invalid value: integer `123456789`, expected u8", ); @@ -427,7 +427,7 @@ fn config_bad_toml() { "\ could not load Cargo configuration Caused by: - could not parse TOML configuration in `[..][/].cargo[/]config` + could not parse TOML configuration in `[..]/.cargo/config` Caused by: could not parse input as TOML Caused by: @@ -477,7 +477,7 @@ l = ['y'] config.get::("l3").unwrap_err(), "\ invalid configuration for key `l3` -expected a list, but found a integer for `l3` in [..][/].cargo[/]config", +expected a list, but found a integer for `l3` in [..]/.cargo/config", ); assert_eq!( config.get::("l4").unwrap(), @@ -656,7 +656,7 @@ i64max = 9223372036854775807 assert_error( config.get::("nneg").unwrap_err(), - "error in [..].cargo[/]config: \ + "error in [..].cargo/config: \ could not load config key `nneg`: \ invalid value: integer `-123456789`, expected u32", ); @@ -668,7 +668,7 @@ i64max = 9223372036854775807 ); assert_error( config.get::("npos").unwrap_err(), - "error in [..].cargo[/]config: \ + "error in [..].cargo/config: \ could not load config key `npos`: \ invalid value: integer `123456789`, expected i8", ); diff --git a/tests/testsuite/cross_compile.rs b/tests/testsuite/cross_compile.rs index 7e927fd53..828fac657 100644 --- a/tests/testsuite/cross_compile.rs +++ b/tests/testsuite/cross_compile.rs @@ -402,14 +402,14 @@ fn linker_and_ar() { execs().with_status(101).with_stderr_contains(&format!( "\ [COMPILING] foo v0.5.0 ({url}) -[RUNNING] `rustc --crate-name foo src[/]foo.rs --crate-type bin \ +[RUNNING] `rustc --crate-name foo src/foo.rs --crate-type bin \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ - --out-dir {dir}[/]target[/]{target}[/]debug[/]deps \ + --out-dir {dir}/target/{target}/debug/deps \ --target {target} \ -C ar=my-ar-tool -C linker=my-linker-tool \ - -L dependency={dir}[/]target[/]{target}[/]debug[/]deps \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/{target}/debug/deps \ + -L dependency={dir}/target/debug/deps` ", dir = p.root().display(), url = p.url(), @@ -564,8 +564,8 @@ fn cross_tests() { "\ [COMPILING] foo v0.0.0 ({foo}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]{triple}[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]{triple}[/]debug[/]deps[/]bar-[..][EXE]", +[RUNNING] target/{triple}/debug/deps/foo-[..][EXE] +[RUNNING] target/{triple}/debug/deps/bar-[..][EXE]", foo = p.url(), triple = target )) @@ -596,7 +596,7 @@ fn no_cross_doctests() { "\ [COMPILING] foo v0.0.1 ({foo}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [DOCTEST] foo ", foo = p.url() @@ -616,7 +616,7 @@ fn no_cross_doctests() { "\ [COMPILING] foo v0.0.1 ({foo}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]{triple}[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/{triple}/debug/deps/foo-[..][EXE] [DOCTEST] foo ", foo = p.url(), @@ -632,7 +632,7 @@ fn no_cross_doctests() { "\ [COMPILING] foo v0.0.1 ({foo}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]{triple}[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/{triple}/debug/deps/foo-[..][EXE] ", foo = p.url(), triple = target @@ -720,9 +720,9 @@ fn cross_with_a_build_script() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] foo v0.0.0 (file://[..]) -[RUNNING] `rustc [..] build.rs [..] --out-dir {dir}[/]target[/]debug[/]build[/]foo-[..]` -[RUNNING] `{dir}[/]target[/]debug[/]build[/]foo-[..][/]build-script-build` -[RUNNING] `rustc [..] src[/]main.rs [..] --target {target} [..]` +[RUNNING] `rustc [..] build.rs [..] --out-dir {dir}/target/debug/build/foo-[..]` +[RUNNING] `{dir}/target/debug/build/foo-[..]/build-script-build` +[RUNNING] `rustc [..] src/main.rs [..] --target {target} [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", target = target, @@ -822,14 +822,14 @@ fn build_script_needed_for_host_and_target() { "[COMPILING] d1 v0.0.0 ({url}/d1)", url = p.url() )) - .with_stderr_contains(&format!("[RUNNING] `rustc [..] d1[/]build.rs [..] --out-dir {dir}[/]target[/]debug[/]build[/]d1-[..]`", + .with_stderr_contains(&format!("[RUNNING] `rustc [..] d1/build.rs [..] --out-dir {dir}/target/debug/build/d1-[..]`", dir = p.root().display())) .with_stderr_contains(&format!( - "[RUNNING] `{dir}[/]target[/]debug[/]build[/]d1-[..][/]build-script-build`", + "[RUNNING] `{dir}/target/debug/build/d1-[..]/build-script-build`", dir = p.root().display() )) .with_stderr_contains( - "[RUNNING] `rustc [..] d1[/]src[/]lib.rs [..]`", + "[RUNNING] `rustc [..] d1/src/lib.rs [..]`", ) .with_stderr_contains(&format!( "[COMPILING] d2 v0.0.0 ({url}/d2)", @@ -837,7 +837,7 @@ fn build_script_needed_for_host_and_target() { )) .with_stderr_contains(&format!( "\ - [RUNNING] `rustc [..] d2[/]src[/]lib.rs [..] \ + [RUNNING] `rustc [..] d2/src/lib.rs [..] \ -L /path/to/{host}`", host = host )) @@ -846,11 +846,11 @@ fn build_script_needed_for_host_and_target() { url = p.url() )) .with_stderr_contains(&format!("\ -[RUNNING] `rustc [..] build.rs [..] --out-dir {dir}[/]target[/]debug[/]build[/]foo-[..] \ +[RUNNING] `rustc [..] build.rs [..] --out-dir {dir}/target/debug/build/foo-[..] \ -L /path/to/{host}`", dir = p.root().display(), host = host)) .with_stderr_contains(&format!( "\ - [RUNNING] `rustc [..] src[/]main.rs [..] --target {target} [..] \ + [RUNNING] `rustc [..] src/main.rs [..] --target {target} [..] \ -L /path/to/{target}`", target = target )), @@ -990,8 +990,8 @@ fn plugin_build_script_right_arch() { "\ [COMPILING] foo v0.0.1 ([..]) [RUNNING] `rustc [..] build.rs [..]` -[RUNNING] `[..][/]build-script-build` -[RUNNING] `rustc [..] src[/]lib.rs [..]` +[RUNNING] `[..]/build-script-build` +[RUNNING] `rustc [..] src/lib.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -1054,13 +1054,13 @@ fn build_script_with_platform_specific_dependencies() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] d2 v0.0.0 ([..]) -[RUNNING] `rustc [..] d2[/]src[/]lib.rs [..]` +[RUNNING] `rustc [..] d2/src/lib.rs [..]` [COMPILING] d1 v0.0.0 ([..]) -[RUNNING] `rustc [..] d1[/]src[/]lib.rs [..]` +[RUNNING] `rustc [..] d1/src/lib.rs [..]` [COMPILING] foo v0.0.1 ([..]) [RUNNING] `rustc [..] build.rs [..]` -[RUNNING] `{dir}[/]target[/]debug[/]build[/]foo-[..][/]build-script-build` -[RUNNING] `rustc [..] src[/]lib.rs [..] --target {target} [..]` +[RUNNING] `{dir}/target/debug/build/foo-[..]/build-script-build` +[RUNNING] `rustc [..] src/lib.rs [..] --target {target} [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -1294,8 +1294,8 @@ fn cross_test_dylib() { [COMPILING] bar v0.0.1 ({dir}/bar) [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]{arch}[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]{arch}[/]debug[/]deps[/]test-[..][EXE]", +[RUNNING] target/{arch}/debug/deps/foo-[..][EXE] +[RUNNING] target/{arch}/debug/deps/test-[..][EXE]", dir = p.url(), arch = cross_compile::alternate() )) diff --git a/tests/testsuite/doc.rs b/tests/testsuite/doc.rs index fc933ad3b..c19596c61 100644 --- a/tests/testsuite/doc.rs +++ b/tests/testsuite/doc.rs @@ -813,7 +813,7 @@ fn doc_release() { execs().with_status(0).with_stderr( "\ [DOCUMENTING] foo v0.0.1 ([..]) -[RUNNING] `rustdoc [..] src[/]lib.rs [..]` +[RUNNING] `rustdoc [..] src/lib.rs [..]` [FINISHED] release [optimized] target(s) in [..] ", ), @@ -1178,7 +1178,7 @@ fn doc_workspace_open_different_library_and_package_names() { execs() .with_status(0) .with_stderr_contains("[..] Documenting foo v0.1.0 ([..])") - .with_stderr_contains("[..] Opening [..][/]foo[/]target[/]doc[/]foolib[/]index.html") + .with_stderr_contains("[..] Opening [..]/foo/target/doc/foolib/index.html") ); } @@ -1212,7 +1212,7 @@ fn doc_workspace_open_binary() { execs() .with_status(0) .with_stderr_contains("[..] Documenting foo v0.1.0 ([..])") - .with_stderr_contains("[..] Opening [..][/]foo[/]target[/]doc[/]foobin[/]index.html") + .with_stderr_contains("[..] Opening [..]/foo/target/doc/foobin/index.html") ); } @@ -1249,7 +1249,7 @@ fn doc_workspace_open_binary_and_library() { execs() .with_status(0) .with_stderr_contains("[..] Documenting foo v0.1.0 ([..])") - .with_stderr_contains("[..] Opening [..][/]foo[/]target[/]doc[/]foolib[/]index.html") + .with_stderr_contains("[..] Opening [..]/foo/target/doc/foolib/index.html") ); } diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index af25d037b..686d51f95 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -143,7 +143,7 @@ fn broken_fixes_backed_out() { after fixes were automatically applied the compiler reported \ errors within these files:\n\ \n \ - * src[/]lib.rs\n\ + * src/lib.rs\n\ \n\ This likely indicates a bug in either rustc or cargo itself,\n\ and we would appreciate a bug report! You're likely to see \n\ @@ -203,9 +203,9 @@ fn fix_path_deps() { .with_stdout("") .with_stderr("\ [CHECKING] bar v0.1.0 ([..]) -[FIXING] bar[/]src[/]lib.rs (1 fix) +[FIXING] bar/src/lib.rs (1 fix) [CHECKING] foo v0.1.0 ([..]) -[FIXING] src[/]lib.rs (1 fix) +[FIXING] src/lib.rs (1 fix) [FINISHED] [..] ") ); @@ -280,7 +280,7 @@ fn prepare_for_2018() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -[FIXING] src[/]lib.rs (2 fixes) +[FIXING] src/lib.rs (2 fixes) [FINISHED] [..] "; assert_that( @@ -319,7 +319,7 @@ fn local_paths() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -[FIXING] src[/]lib.rs (1 fix) +[FIXING] src/lib.rs (1 fix) [FINISHED] [..] "; @@ -356,7 +356,7 @@ fn local_paths_no_fix() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -warning: failed to find `#![feature(rust_2018_preview)]` in `src[/]lib.rs` +warning: failed to find `#![feature(rust_2018_preview)]` in `src/lib.rs` this may cause `cargo fix` to not be able to fix all issues in preparation for the 2018 edition [FINISHED] [..] @@ -410,7 +410,7 @@ fn upgrade_extern_crate() { let stderr = "\ [CHECKING] bar v0.1.0 ([..]) [CHECKING] foo v0.1.0 ([..]) -[FIXING] src[/]lib.rs (1 fix) +[FIXING] src/lib.rs (1 fix) [FINISHED] [..] "; assert_that( @@ -448,7 +448,7 @@ fn specify_rustflags() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -[FIXING] src[/]lib.rs (1 fix) +[FIXING] src/lib.rs (1 fix) [FINISHED] [..] "; assert_that( @@ -490,7 +490,7 @@ fn fixes_extra_mut() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -[FIXING] src[/]lib.rs (1 fix) +[FIXING] src/lib.rs (1 fix) [FINISHED] [..] "; assert_that( @@ -517,7 +517,7 @@ fn fixes_two_missing_ampersands() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -[FIXING] src[/]lib.rs (2 fixes) +[FIXING] src/lib.rs (2 fixes) [FINISHED] [..] "; assert_that( @@ -543,7 +543,7 @@ fn tricky() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -[FIXING] src[/]lib.rs (2 fixes) +[FIXING] src/lib.rs (2 fixes) [FINISHED] [..] "; assert_that( @@ -650,8 +650,8 @@ fn fix_two_files() { .env("__CARGO_FIX_YOLO", "1"), execs() .with_status(0) - .with_stderr_contains("[FIXING] src[/]bar.rs (1 fix)") - .with_stderr_contains("[FIXING] src[/]lib.rs (1 fix)"), + .with_stderr_contains("[FIXING] src/bar.rs (1 fix)") + .with_stderr_contains("[FIXING] src/lib.rs (1 fix)"), ); assert!(!p.read_file("src/lib.rs").contains("let mut x = 3;")); assert!(!p.read_file("src/bar.rs").contains("let mut x = 3;")); @@ -694,10 +694,10 @@ fn fixes_missing_ampersand() { // compile (and fix) in `--test` mode first, we get two fixes. Otherwise // we'll fix one non-test thing, and then fix another one later in // test mode. - .with_stderr_contains("[FIXING] src[/]lib.rs[..]") - .with_stderr_contains("[FIXING] src[/]main.rs (1 fix)") - .with_stderr_contains("[FIXING] examples[/]foo.rs (1 fix)") - .with_stderr_contains("[FIXING] tests[/]a.rs (1 fix)") + .with_stderr_contains("[FIXING] src/lib.rs[..]") + .with_stderr_contains("[FIXING] src/main.rs (1 fix)") + .with_stderr_contains("[FIXING] examples/foo.rs (1 fix)") + .with_stderr_contains("[FIXING] tests/a.rs (1 fix)") .with_stderr_contains("[FINISHED] [..]"), ); assert_that(p.cargo("build"), execs().with_status(0)); @@ -884,7 +884,7 @@ fn prepare_for_and_enable() { let stderr = "\ [CHECKING] foo v0.1.0 ([..]) error: cannot prepare for the 2018 edition when it is enabled, so cargo cannot -automatically fix errors in `src[/]lib.rs` +automatically fix errors in `src/lib.rs` To prepare for the 2018 edition you should first remove `edition = '2018'` from your `Cargo.toml` and then rerun this command. Once all warnings have been fixed @@ -914,7 +914,7 @@ fn prepare_for_without_feature_issues_warning() { let stderr = "\ [CHECKING] foo v0.0.1 ([..]) -warning: failed to find `#![feature(rust_2018_preview)]` in `src[/]lib.rs` +warning: failed to find `#![feature(rust_2018_preview)]` in `src/lib.rs` this may cause `cargo fix` to not be able to fix all issues in preparation for the 2018 edition [FINISHED] [..] @@ -953,7 +953,7 @@ fn fix_overlapping() { let stderr = "\ [CHECKING] foo [..] -[FIXING] src[/]lib.rs (2 fixes) +[FIXING] src/lib.rs (2 fixes) [FINISHED] dev [..] "; diff --git a/tests/testsuite/freshness.rs b/tests/testsuite/freshness.rs index 59da71ea3..7f5024659 100644 --- a/tests/testsuite/freshness.rs +++ b/tests/testsuite/freshness.rs @@ -362,7 +362,7 @@ fn changing_bin_paths_common_target_features_caches_targets() { [..]Compiling dep_crate v0.0.1 ([..]) [..]Compiling a v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..]target[/]debug[/]a[EXE]` +[RUNNING] `[..]target/debug/a[EXE]` ", ), ); @@ -376,7 +376,7 @@ fn changing_bin_paths_common_target_features_caches_targets() { "\ [..]Compiling a v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..]target[/]debug[/]a[EXE]` +[RUNNING] `[..]target/debug/a[EXE]` ", ), ); @@ -389,7 +389,7 @@ fn changing_bin_paths_common_target_features_caches_targets() { [..]Compiling dep_crate v0.0.1 ([..]) [..]Compiling b v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..]target[/]debug[/]b[EXE]` +[RUNNING] `[..]target/debug/b[EXE]` ", ), ); @@ -403,7 +403,7 @@ fn changing_bin_paths_common_target_features_caches_targets() { "\ [..]Compiling b v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..]target[/]debug[/]b[EXE]` +[RUNNING] `[..]target/debug/b[EXE]` ", ), ); @@ -420,7 +420,7 @@ fn changing_bin_paths_common_target_features_caches_targets() { "\ [..]Compiling a v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..]target[/]debug[/]a[EXE]` +[RUNNING] `[..]target/debug/a[EXE]` ", ), ); @@ -437,7 +437,7 @@ fn changing_bin_paths_common_target_features_caches_targets() { "\ [..]Compiling b v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..]target[/]debug[/]b[EXE]` +[RUNNING] `[..]target/debug/b[EXE]` ", ), ); @@ -854,7 +854,7 @@ fn rebuild_if_environment_changes() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]foo[EXE]` +[RUNNING] `target/debug/foo[EXE]` ", dir = p.url() )), @@ -882,7 +882,7 @@ fn rebuild_if_environment_changes() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]foo[EXE]` +[RUNNING] `target/debug/foo[EXE]` ", dir = p.url() )), diff --git a/tests/testsuite/git.rs b/tests/testsuite/git.rs index 46820523d..a02730958 100644 --- a/tests/testsuite/git.rs +++ b/tests/testsuite/git.rs @@ -1351,7 +1351,7 @@ fn dep_with_changed_submodule() { [COMPILING] foo v0.5.0 ([..])\n\ [FINISHED] dev [unoptimized + debuginfo] target(s) in \ [..]\n\ - [RUNNING] `target[/]debug[/]foo[EXE]`\n", + [RUNNING] `target/debug/foo[EXE]`\n", ) .with_stdout("project2\n") .with_status(0), @@ -1409,7 +1409,7 @@ fn dep_with_changed_submodule() { [COMPILING] foo v0.5.0 ([..])\n\ [FINISHED] dev [unoptimized + debuginfo] target(s) in \ [..]\n\ - [RUNNING] `target[/]debug[/]foo[EXE]`\n", + [RUNNING] `target/debug/foo[EXE]`\n", ) .with_stdout("project3\n") .with_status(0), @@ -1486,7 +1486,7 @@ fn dev_deps_with_testing() { [COMPILING] [..] v0.5.0 ([..]) [COMPILING] [..] v0.5.0 ([..] [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", ) .with_stdout_contains("test tests::foo ... ok"), ); @@ -2549,8 +2549,8 @@ fn include_overrides_gitignore() { [RUNNING] `rustc --crate-name filetime [..]` [COMPILING] reduction [..] [RUNNING] `rustc --crate-name build_script_tango_build tango-build.rs --crate-type bin [..]` -[RUNNING] `[..][/]build-script-tango-build` -[RUNNING] `rustc --crate-name reduction src[/]lib.rs --crate-type lib [..]` +[RUNNING] `[..]/build-script-tango-build` +[RUNNING] `rustc --crate-name reduction src/lib.rs --crate-type lib [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -2580,7 +2580,7 @@ fn include_overrides_gitignore() { [FRESH] libc [..] [FRESH] filetime [..] [COMPILING] reduction [..] -[RUNNING] `rustc --crate-name reduction src[/]lib.rs --crate-type lib [..]` +[RUNNING] `rustc --crate-name reduction src/lib.rs --crate-type lib [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -2600,8 +2600,8 @@ fn include_overrides_gitignore() { [FRESH] libc [..] [FRESH] filetime [..] [COMPILING] reduction [..] -[RUNNING] `[..][/]build-script-tango-build` -[RUNNING] `rustc --crate-name reduction src[/]lib.rs --crate-type lib [..]` +[RUNNING] `[..]/build-script-tango-build` +[RUNNING] `rustc --crate-name reduction src/lib.rs --crate-type lib [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), diff --git a/tests/testsuite/metadata.rs b/tests/testsuite/metadata.rs index 2efb27dd3..0f010914c 100644 --- a/tests/testsuite/metadata.rs +++ b/tests/testsuite/metadata.rs @@ -42,7 +42,7 @@ fn cargo_metadata_simple() { ], "edition": "2015", "name": "foo", - "src_path": "[..][/]foo[/]src[/]foo.rs" + "src_path": "[..]/foo/src/foo.rs" } ], "features": {}, @@ -61,9 +61,9 @@ fn cargo_metadata_simple() { ], "root": "foo 0.5.0 (path+file:[..]foo)" }, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ); @@ -135,7 +135,7 @@ crate-type = ["lib", "staticlib"] ], "edition": "2015", "name": "foo", - "src_path": "[..][/]foo[/]src[/]lib.rs" + "src_path": "[..]/foo/src/lib.rs" } ], "features": {}, @@ -154,9 +154,9 @@ crate-type = ["lib", "staticlib"] ], "root": "foo 0.5.0 (path+file:[..]foo)" }, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ); @@ -212,7 +212,7 @@ optional_feat = [] ], "edition": "2015", "name": "foo", - "src_path": "[..][/]foo[/]src[/]lib.rs" + "src_path": "[..]/foo/src/lib.rs" } ], "features": { @@ -240,9 +240,9 @@ optional_feat = [] ], "root": "foo 0.5.0 (path+file:[..]foo)" }, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ); @@ -429,9 +429,9 @@ fn cargo_metadata_with_deps_and_version() { ], "root": "foo 0.5.0 (path+file:[..]foo)" }, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ); @@ -482,14 +482,14 @@ name = "ex" "crate_types": [ "lib" ], "edition": "2015", "name": "foo", - "src_path": "[..][/]foo[/]src[/]lib.rs" + "src_path": "[..]/foo/src/lib.rs" }, { "kind": [ "example" ], "crate_types": [ "bin" ], "edition": "2015", "name": "ex", - "src_path": "[..][/]foo[/]examples[/]ex.rs" + "src_path": "[..]/foo/examples/ex.rs" } ], "features": {}, @@ -510,9 +510,9 @@ name = "ex" } ] }, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ); @@ -564,14 +564,14 @@ crate-type = ["rlib", "dylib"] "crate_types": [ "lib" ], "edition": "2015", "name": "foo", - "src_path": "[..][/]foo[/]src[/]lib.rs" + "src_path": "[..]/foo/src/lib.rs" }, { "kind": [ "example" ], "crate_types": [ "rlib", "dylib" ], "edition": "2015", "name": "ex", - "src_path": "[..][/]foo[/]examples[/]ex.rs" + "src_path": "[..]/foo/examples/ex.rs" } ], "features": {}, @@ -592,9 +592,9 @@ crate-type = ["rlib", "dylib"] } ] }, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ); @@ -645,11 +645,11 @@ fn workspace_metadata() { "crate_types": [ "lib" ], "edition": "2015", "name": "bar", - "src_path": "[..]bar[/]src[/]lib.rs" + "src_path": "[..]bar/src/lib.rs" } ], "features": {}, - "manifest_path": "[..]bar[/]Cargo.toml", + "manifest_path": "[..]bar/Cargo.toml", "metadata": null }, { @@ -675,11 +675,11 @@ fn workspace_metadata() { "crate_types": [ "lib" ], "edition": "2015", "name": "baz", - "src_path": "[..]baz[/]src[/]lib.rs" + "src_path": "[..]baz/src/lib.rs" } ], "features": {}, - "manifest_path": "[..]baz[/]Cargo.toml", + "manifest_path": "[..]baz/Cargo.toml", "metadata": null } ], @@ -699,9 +699,9 @@ fn workspace_metadata() { ], "root": null }, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ) @@ -752,11 +752,11 @@ fn workspace_metadata_no_deps() { "crate_types": [ "lib" ], "edition": "2015", "name": "bar", - "src_path": "[..]bar[/]src[/]lib.rs" + "src_path": "[..]bar/src/lib.rs" } ], "features": {}, - "manifest_path": "[..]bar[/]Cargo.toml", + "manifest_path": "[..]bar/Cargo.toml", "metadata": null }, { @@ -782,19 +782,19 @@ fn workspace_metadata_no_deps() { "crate_types": ["lib"], "edition": "2015", "name": "baz", - "src_path": "[..]baz[/]src[/]lib.rs" + "src_path": "[..]baz/src/lib.rs" } ], "features": {}, - "manifest_path": "[..]baz[/]Cargo.toml", + "manifest_path": "[..]baz/Cargo.toml", "metadata": null } ], "workspace_members": ["baz 0.5.0 (path+file:[..]baz)", "bar 0.5.0 (path+file:[..]bar)"], "resolve": null, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ) @@ -838,7 +838,7 @@ const MANIFEST_OUTPUT: &str = r#" "crate_types":["bin"], "edition": "2015", "name":"foo", - "src_path":"[..][/]foo[/]src[/]foo.rs" + "src_path":"[..]/foo/src/foo.rs" }], "features":{}, "manifest_path":"[..]Cargo.toml", @@ -848,9 +848,9 @@ const MANIFEST_OUTPUT: &str = r#" }], "workspace_members": [ "foo 0.5.0 (path+file:[..]foo)" ], "resolve": null, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#; #[test] @@ -1036,11 +1036,11 @@ fn package_metadata() { "crate_types": [ "lib" ], "edition": "2015", "name": "foo", - "src_path": "[..]foo[/]src[/]lib.rs" + "src_path": "[..]foo/src/lib.rs" } ], "features": {}, - "manifest_path": "[..]foo[/]Cargo.toml", + "manifest_path": "[..]foo/Cargo.toml", "metadata": { "bar": { "baz": "quux" @@ -1050,9 +1050,9 @@ fn package_metadata() { ], "workspace_members": ["foo[..]"], "resolve": null, - "target_directory": "[..]foo[/]target", + "target_directory": "[..]foo/target", "version": 1, - "workspace_root": "[..][/]foo" + "workspace_root": "[..]/foo" }"#, ), ); @@ -1117,7 +1117,7 @@ fn cargo_metadata_path_to_cargo_toml_project() { "lib" ], "name": "bar", - "src_path": "[..]src[/]lib.rs" + "src_path": "[..]src/lib.rs" } ], "version": "0.5.0" @@ -1197,7 +1197,7 @@ fn package_edition_2018() { "lib" ], "name": "foo", - "src_path": "[..]src[/]lib.rs" + "src_path": "[..]src/lib.rs" } ], "version": "0.1.0" @@ -1281,7 +1281,7 @@ fn target_edition_2018() { "lib" ], "name": "foo", - "src_path": "[..]src[/]lib.rs" + "src_path": "[..]src/lib.rs" }, { "crate_types": [ @@ -1292,7 +1292,7 @@ fn target_edition_2018() { "bin" ], "name": "foo", - "src_path": "[..]src[/]main.rs" + "src_path": "[..]src/main.rs" } ], "version": "0.1.0" diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index e00f65178..bbf2d1ad2 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -50,7 +50,7 @@ See [..] execs().with_status(0).with_stdout( "\ Cargo.toml -src[/]main.rs +src/main.rs ", ), ); @@ -327,17 +327,17 @@ fn exclude() { [WARNING] manifest has no description[..] See http://doc.crates.io/manifest.html#package-metadata for more info. [PACKAGING] foo v0.0.1 ([..]) -[WARNING] [..] file `dir_root_1[/]some_dir[/]file` WILL be excluded [..] +[WARNING] [..] file `dir_root_1/some_dir/file` WILL be excluded [..] See [..] -[WARNING] [..] file `dir_root_2[/]some_dir[/]file` WILL be excluded [..] +[WARNING] [..] file `dir_root_2/some_dir/file` WILL be excluded [..] See [..] -[WARNING] [..] file `dir_root_3[/]some_dir[/]file` WILL be excluded [..] +[WARNING] [..] file `dir_root_3/some_dir/file` WILL be excluded [..] See [..] -[WARNING] [..] file `some_dir[/]dir_deep_1[/]some_dir[/]file` WILL be excluded [..] +[WARNING] [..] file `some_dir/dir_deep_1/some_dir/file` WILL be excluded [..] See [..] -[WARNING] [..] file `some_dir[/]dir_deep_3[/]some_dir[/]file` WILL be excluded [..] +[WARNING] [..] file `some_dir/dir_deep_3/some_dir/file` WILL be excluded [..] See [..] -[WARNING] [..] file `some_dir[/]file_deep_1` WILL be excluded [..] +[WARNING] [..] file `some_dir/file_deep_1` WILL be excluded [..] See [..] [ARCHIVING] [..] [ARCHIVING] [..] @@ -371,23 +371,23 @@ See [..] execs().with_status(0).with_stdout( "\ Cargo.toml -dir_root_1[/]some_dir[/]file -dir_root_2[/]some_dir[/]file -dir_root_3[/]some_dir[/]file +dir_root_1/some_dir/file +dir_root_2/some_dir/file +dir_root_3/some_dir/file file_root_3 file_root_4 file_root_5 -some_dir[/]dir_deep_1[/]some_dir[/]file -some_dir[/]dir_deep_2[/]some_dir[/]file -some_dir[/]dir_deep_3[/]some_dir[/]file -some_dir[/]dir_deep_4[/]some_dir[/]file -some_dir[/]dir_deep_5[/]some_dir[/]file -some_dir[/]file_deep_1 -some_dir[/]file_deep_2 -some_dir[/]file_deep_3 -some_dir[/]file_deep_4 -some_dir[/]file_deep_5 -src[/]main.rs +some_dir/dir_deep_1/some_dir/file +some_dir/dir_deep_2/some_dir/file +some_dir/dir_deep_3/some_dir/file +some_dir/dir_deep_4/some_dir/file +some_dir/dir_deep_5/some_dir/file +some_dir/file_deep_1 +some_dir/file_deep_2 +some_dir/file_deep_3 +some_dir/file_deep_4 +some_dir/file_deep_5 +src/main.rs ", ), ); @@ -1120,7 +1120,7 @@ See [..] "\ Cargo.lock Cargo.toml -src[/]main.rs +src/main.rs ", ), ); @@ -1298,7 +1298,7 @@ error: failed to verify package tarball Caused by: Source directory was modified by build.rs during cargo publish. \ -Build scripts should not modify anything outside of OUT_DIR. Modified file: [..]src[/]generated.txt +Build scripts should not modify anything outside of OUT_DIR. Modified file: [..]src/generated.txt To proceed despite this, pass the `--no-verify` flag.", ), diff --git a/tests/testsuite/path.rs b/tests/testsuite/path.rs index 0e699b596..f21639486 100644 --- a/tests/testsuite/path.rs +++ b/tests/testsuite/path.rs @@ -200,7 +200,7 @@ fn cargo_compile_with_root_dev_deps_with_testing() { [COMPILING] [..] v0.5.0 ([..]) [COMPILING] [..] v0.5.0 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", ) .with_stdout_contains("running 0 tests"), ); @@ -562,7 +562,7 @@ Caused by: Unable to update file://[..] Caused by: - failed to read `[..]bar[/]Cargo.toml` + failed to read `[..]bar/Cargo.toml` Caused by: [..] (os error [..]) @@ -827,7 +827,7 @@ fn dev_deps_no_rebuild_lib() { [COMPILING] [..] v0.5.0 ({url}[..]) [COMPILING] [..] v0.5.0 ({url}[..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", url = p.url() )) .with_stdout_contains("running 0 tests"), diff --git a/tests/testsuite/profile_config.rs b/tests/testsuite/profile_config.rs index 343dafd79..7bf2dedc4 100644 --- a/tests/testsuite/profile_config.rs +++ b/tests/testsuite/profile_config.rs @@ -69,11 +69,11 @@ fn profile_config_validate_warnings() { .masquerade_as_nightly_cargo(), execs().with_status(0).with_stderr_unordered( "\ -[WARNING] unused key `profile.asdf` in config file `[..].cargo[/]config` -[WARNING] unused key `profile.test` in config file `[..].cargo[/]config` -[WARNING] unused key `profile.dev.bad-key` in config file `[..].cargo[/]config` -[WARNING] unused key `profile.dev.overrides.bar.bad-key-bar` in config file `[..].cargo[/]config` -[WARNING] unused key `profile.dev.build-override.bad-key-bo` in config file `[..].cargo[/]config` +[WARNING] unused key `profile.asdf` in config file `[..].cargo/config` +[WARNING] unused key `profile.test` in config file `[..].cargo/config` +[WARNING] unused key `profile.dev.bad-key` in config file `[..].cargo/config` +[WARNING] unused key `profile.dev.overrides.bar.bad-key-bar` in config file `[..].cargo/config` +[WARNING] unused key `profile.dev.build-override.bad-key-bo` in config file `[..].cargo/config` [COMPILING] foo [..] [FINISHED] [..] ", @@ -107,10 +107,10 @@ fn profile_config_error_paths() { .masquerade_as_nightly_cargo(), execs().with_status(101).with_stderr( "\ -[ERROR] failed to parse manifest at `[..]foo[/]Cargo.toml` +[ERROR] failed to parse manifest at `[..]foo/Cargo.toml` Caused by: - error in [..].cargo[/]config: `profile.dev.rpath` expected true/false, but found a string + error in [..].cargo/config: `profile.dev.rpath` expected true/false, but found a string ", ), ); @@ -144,7 +144,7 @@ fn profile_config_validate_errors() { .masquerade_as_nightly_cargo(), execs().with_status(101).with_stderr( "\ -[ERROR] failed to parse manifest at `[..]foo[/]Cargo.toml` +[ERROR] failed to parse manifest at `[..]foo/Cargo.toml` Caused by: config profile `profile.dev` is not valid @@ -178,7 +178,7 @@ fn profile_config_syntax_errors() { [ERROR] failed to parse manifest at [..] Caused by: - error in [..].cargo[/]config: `profile.dev.codegen-units` expected an integer, but found a string + error in [..].cargo/config: `profile.dev.codegen-units` expected an integer, but found a string ", ), ); diff --git a/tests/testsuite/profile_overrides.rs b/tests/testsuite/profile_overrides.rs index bd8384bbb..e54b29f13 100644 --- a/tests/testsuite/profile_overrides.rs +++ b/tests/testsuite/profile_overrides.rs @@ -318,17 +318,17 @@ fn profile_override_hierarchy() { execs().with_status(0).with_stderr_unordered("\ [COMPILING] m3 [..] [COMPILING] dep [..] -[RUNNING] `rustc --crate-name m3 m3[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=4 [..] -[RUNNING] `rustc --crate-name dep [..]dep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=3 [..] -[RUNNING] `rustc --crate-name m3 m3[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 [..] -[RUNNING] `rustc --crate-name build_script_build m1[/]build.rs --crate-type bin --emit=dep-info,link -C codegen-units=4 [..] +[RUNNING] `rustc --crate-name m3 m3/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=4 [..] +[RUNNING] `rustc --crate-name dep [..]dep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=3 [..] +[RUNNING] `rustc --crate-name m3 m3/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 [..] +[RUNNING] `rustc --crate-name build_script_build m1/build.rs --crate-type bin --emit=dep-info,link -C codegen-units=4 [..] [COMPILING] m2 [..] -[RUNNING] `rustc --crate-name build_script_build m2[/]build.rs --crate-type bin --emit=dep-info,link -C codegen-units=2 [..] -[RUNNING] `[..][/]m1-[..][/]build-script-build` -[RUNNING] `[..][/]m2-[..][/]build-script-build` -[RUNNING] `rustc --crate-name m2 m2[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name build_script_build m2/build.rs --crate-type bin --emit=dep-info,link -C codegen-units=2 [..] +[RUNNING] `[..]/m1-[..]/build-script-build` +[RUNNING] `[..]/m2-[..]/build-script-build` +[RUNNING] `rustc --crate-name m2 m2/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=2 [..] [COMPILING] m1 [..] -[RUNNING] `rustc --crate-name m1 m1[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 [..] +[RUNNING] `rustc --crate-name m1 m1/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 [..] [FINISHED] dev [unoptimized + debuginfo] [..] ", ), @@ -431,10 +431,10 @@ fn profile_override_spec() { execs() .with_status(0) .with_stderr_contains( - "[RUNNING] `rustc [..]dep1[/]src[/]lib.rs [..] -C codegen-units=1 [..]", + "[RUNNING] `rustc [..]dep1/src/lib.rs [..] -C codegen-units=1 [..]", ) .with_stderr_contains( - "[RUNNING] `rustc [..]dep2[/]src[/]lib.rs [..] -C codegen-units=2 [..]", + "[RUNNING] `rustc [..]dep2/src/lib.rs [..] -C codegen-units=2 [..]", ), ); } diff --git a/tests/testsuite/profile_targets.rs b/tests/testsuite/profile_targets.rs index 3bbcc4089..7a2675e4e 100644 --- a/tests/testsuite/profile_targets.rs +++ b/tests/testsuite/profile_targets.rs @@ -78,15 +78,15 @@ fn profile_selection_build() { // - build_script_build is built without panic because it thinks `build.rs` is a plugin. assert_that(p.cargo("build -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..][/]target[/]debug[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build` foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] [FINISHED] dev [unoptimized + debuginfo] [..] ")); assert_that( @@ -110,15 +110,15 @@ fn profile_selection_build_release() { assert_that(p.cargo("build --release -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `[..][/]target[/]release[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]/target/release/build/foo-[..]/build-script-build` foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] [FINISHED] release [optimized] [..] ")); assert_that( @@ -176,26 +176,26 @@ fn profile_selection_build_all_targets() { assert_that(p.cargo("build --all-targets -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..][/]target[/]debug[/]build[/]foo-[..][/]build-script-build` -[RUNNING] `[..][/]target[/]debug[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build` +[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build` foo custom build PROFILE=debug DEBUG=false OPT_LEVEL=3 foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]` -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]` -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..]` -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]` -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]` -[RUNNING] `rustc --crate-name bench1 benches[/]bench1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]` -[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]` +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]` +[RUNNING] `rustc --crate-name test1 tests/test1.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..]` +[RUNNING] `rustc --crate-name bench1 benches/bench1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]` +[RUNNING] `rustc --crate-name ex1 examples/ex1.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]` [FINISHED] dev [unoptimized + debuginfo] [..] ")); assert_that( @@ -250,22 +250,22 @@ fn profile_selection_build_all_targets_release() { assert_that(p.cargo("build --all-targets --release -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `[..][/]target[/]release[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]/target/release/build/foo-[..]/build-script-build` foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]` -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]` -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` -[RUNNING] `rustc --crate-name bench1 benches[/]bench1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]` -[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]` +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]` +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..]` +[RUNNING] `rustc --crate-name test1 tests/test1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` +[RUNNING] `rustc --crate-name bench1 benches/bench1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..]` +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]` +[RUNNING] `rustc --crate-name ex1 examples/ex1.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..]` [FINISHED] release [optimized] [..] ")); assert_that( @@ -309,25 +309,25 @@ fn profile_selection_test() { // assert_that(p.cargo("test -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..][/]target[/]debug[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]/target/debug/build/foo-[..]/build-script-build` foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name test1 tests/test1.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name ex1 examples/ex1.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link -C codegen-units=3 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] [FINISHED] dev [unoptimized + debuginfo] [..] -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]test1-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/test1-[..]` [DOCTEST] foo [RUNNING] `rustdoc --test [..] ")); @@ -339,9 +339,9 @@ foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 [FRESH] bdep [..] [FRESH] foo [..] [FINISHED] dev [unoptimized + debuginfo] [..] -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]test1-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/test1-[..]` [DOCTEST] foo [RUNNING] `rustdoc --test [..] ", @@ -377,25 +377,25 @@ fn profile_selection_test_release() { // assert_that(p.cargo("test --release -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `[..][/]target[/]release[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]/target/release/build/foo-[..]/build-script-build` foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] -[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] +[RUNNING] `rustc --crate-name test1 tests/test1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] +[RUNNING] `rustc --crate-name ex1 examples/ex1.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] [FINISHED] release [optimized] [..] -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]test1-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/test1-[..]` [DOCTEST] foo [RUNNING] `rustdoc --test [..]` ")); @@ -407,9 +407,9 @@ foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 [FRESH] bdep [..] [FRESH] foo [..] [FINISHED] release [optimized] [..] -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]foo-[..]` -[RUNNING] `[..][/]deps[/]test1-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/foo-[..]` +[RUNNING] `[..]/deps/test1-[..]` [DOCTEST] foo [RUNNING] `rustdoc --test [..] ", @@ -445,24 +445,24 @@ fn profile_selection_bench() { // assert_that(p.cargo("bench -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `[..]target[/]release[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]target/release/build/foo-[..]/build-script-build` foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] -[RUNNING] `rustc --crate-name bench1 benches[/]bench1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] +[RUNNING] `rustc --crate-name bench1 benches/bench1.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link -C opt-level=3 -C codegen-units=4 --test [..] +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C codegen-units=2 [..] [FINISHED] release [optimized] [..] -[RUNNING] `[..][/]deps[/]foo-[..] --bench` -[RUNNING] `[..][/]deps[/]foo-[..] --bench` -[RUNNING] `[..][/]deps[/]bench1-[..] --bench` +[RUNNING] `[..]/deps/foo-[..] --bench` +[RUNNING] `[..]/deps/foo-[..] --bench` +[RUNNING] `[..]/deps/bench1-[..] --bench` ")); assert_that( p.cargo("bench -vv"), @@ -472,9 +472,9 @@ foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 [FRESH] bdep [..] [FRESH] foo [..] [FINISHED] release [optimized] [..] -[RUNNING] `[..][/]deps[/]foo-[..] --bench` -[RUNNING] `[..][/]deps[/]foo-[..] --bench` -[RUNNING] `[..][/]deps[/]bench1-[..] --bench` +[RUNNING] `[..]/deps/foo-[..] --bench` +[RUNNING] `[..]/deps/foo-[..] --bench` +[RUNNING] `[..]/deps/bench1-[..] --bench` ", ), ); @@ -515,23 +515,23 @@ fn profile_selection_check_all_targets() { // assert_that(p.cargo("check --all-targets -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep[..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..]target[/]debug[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build` foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name bench1 benches[/]bench1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name test1 tests/test1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name bench1 benches/bench1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name ex1 examples/ex1.rs --crate-type bin --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] [FINISHED] dev [unoptimized + debuginfo] [..] ")); // Starting with Rust 1.27, rustc emits `rmeta` files for bins, so @@ -567,23 +567,23 @@ fn profile_selection_check_all_targets_release() { // `dev` for all targets. assert_that(p.cargo("check --all-targets --release -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] [COMPILING] bdep[..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `[..]target[/]release[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]target/release/build/foo-[..]/build-script-build` foo custom build PROFILE=release DEBUG=false OPT_LEVEL=3 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] -[RUNNING] `rustc --crate-name bench1 benches[/]bench1.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] -[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --crate-type bin --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] +[RUNNING] `rustc --crate-name test1 tests/test1.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] +[RUNNING] `rustc --crate-name bench1 benches/bench1.rs --emit=dep-info,metadata -C opt-level=3 -C codegen-units=2 --test [..] +[RUNNING] `rustc --crate-name ex1 examples/ex1.rs --crate-type bin --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] +[RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin --emit=dep-info,metadata -C opt-level=3 -C panic=abort -C codegen-units=2 [..] [FINISHED] release [optimized] [..] ")); @@ -634,20 +634,20 @@ fn profile_selection_check_all_targets_test() { // assert_that(p.cargo("check --all-targets --profile=test -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep[..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..]target[/]debug[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build` foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustc --crate-name foo src[/]lib.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name bench1 benches[/]bench1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] -[RUNNING] `rustc --crate-name ex1 examples[/]ex1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name foo src/lib.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name test1 tests/test1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name bench1 benches/bench1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] +[RUNNING] `rustc --crate-name ex1 examples/ex1.rs --emit=dep-info,metadata -C codegen-units=1 -C debuginfo=2 --test [..] [FINISHED] dev [unoptimized + debuginfo] [..] ")); @@ -681,17 +681,17 @@ fn profile_selection_doc() { assert_that(p.cargo("doc -vv"), execs().with_status(0).with_stderr_unordered("\ [COMPILING] bar [..] [DOCUMENTING] bar [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `rustdoc --crate-name bar bar[/]src[/]lib.rs [..] -[RUNNING] `rustc --crate-name bar bar[/]src[/]lib.rs --crate-type lib --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustdoc --crate-name bar bar/src/lib.rs [..] +[RUNNING] `rustc --crate-name bar bar/src/lib.rs --crate-type lib --emit=dep-info,metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] bdep [..] -[RUNNING] `rustc --crate-name bdep bdep[/]src[/]lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] +[RUNNING] `rustc --crate-name bdep bdep/src/lib.rs --crate-type lib --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] [COMPILING] foo [..] [RUNNING] `rustc --crate-name build_script_build build.rs --crate-type bin --emit=dep-info,link -C codegen-units=1 -C debuginfo=2 [..] -[RUNNING] `[..]target[/]debug[/]build[/]foo-[..][/]build-script-build` +[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build` foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0 [DOCUMENTING] foo [..] -[RUNNING] `rustdoc --crate-name foo src[/]lib.rs [..] +[RUNNING] `rustdoc --crate-name foo src/lib.rs [..] [FINISHED] dev [unoptimized + debuginfo] [..] ")); } diff --git a/tests/testsuite/profiles.rs b/tests/testsuite/profiles.rs index bbfe4101d..efec6176c 100644 --- a/tests/testsuite/profiles.rs +++ b/tests/testsuite/profiles.rs @@ -29,14 +29,14 @@ fn profile_overrides() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name test src/lib.rs --crate-type lib \ --emit=dep-info,link \ -C opt-level=1 \ -C debug-assertions=on \ -C metadata=[..] \ -C rpath \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [optimized] target(s) in [..] ", dir = p.root().display(), @@ -68,12 +68,12 @@ fn opt_level_override_0() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name test src/lib.rs --crate-type lib \ --emit=dep-info,link \ -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] [..] target(s) in [..] ", dir = p.root().display(), @@ -104,12 +104,12 @@ fn debug_override_1() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name test src/lib.rs --crate-type lib \ --emit=dep-info,link \ -C debuginfo=1 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] [..] target(s) in [..] ", dir = p.root().display(), @@ -143,14 +143,14 @@ fn check_opt_level_override(profile_level: &str, rustc_level: &str) { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name test src/lib.rs --crate-type lib \ --emit=dep-info,link \ -C opt-level={level} \ -C debuginfo=2 \ -C debug-assertions=on \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] [..] target(s) in [..] ", dir = p.root().display(), @@ -223,26 +223,26 @@ fn top_level_overrides_deps() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] foo v0.0.0 ({url}/foo) -[RUNNING] `rustc --crate-name foo foo[/]src[/]lib.rs \ +[RUNNING] `rustc --crate-name foo foo/src/lib.rs \ --crate-type dylib --crate-type rlib \ --emit=dep-info,link \ -C prefer-dynamic \ -C opt-level=1 \ -C debuginfo=2 \ -C metadata=[..] \ - --out-dir {dir}[/]target[/]release[/]deps \ - -L dependency={dir}[/]target[/]release[/]deps` + --out-dir {dir}/target/release/deps \ + -L dependency={dir}/target/release/deps` [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name test src/lib.rs --crate-type lib \ --emit=dep-info,link \ -C opt-level=1 \ -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]release[/]deps \ - --extern foo={dir}[/]target[/]release[/]deps[/]\ + -L dependency={dir}/target/release/deps \ + --extern foo={dir}/target/release/deps/\ {prefix}foo[..]{suffix} \ - --extern foo={dir}[/]target[/]release[/]deps[/]libfoo.rlib` + --extern foo={dir}/target/release/deps/libfoo.rlib` [FINISHED] release [optimized + debuginfo] target(s) in [..] ", dir = p.root().display(), diff --git a/tests/testsuite/read_manifest.rs b/tests/testsuite/read_manifest.rs index f38cac5f0..b5d0fd168 100644 --- a/tests/testsuite/read_manifest.rs +++ b/tests/testsuite/read_manifest.rs @@ -24,7 +24,7 @@ static MANIFEST_OUTPUT: &'static str = r#" "crate_types":["bin"], "edition": "2015", "name":"foo", - "src_path":"[..][/]foo[/]src[/]foo.rs" + "src_path":"[..]/foo/src/foo.rs" }], "features":{}, "manifest_path":"[..]Cargo.toml", diff --git a/tests/testsuite/rename_deps.rs b/tests/testsuite/rename_deps.rs index 4ce731e9b..3bb20c685 100644 --- a/tests/testsuite/rename_deps.rs +++ b/tests/testsuite/rename_deps.rs @@ -354,10 +354,10 @@ fn can_run_doc_tests() { execs().with_status(0).with_stderr_contains(format!( "\ [DOCTEST] foo -[RUNNING] `rustdoc --test {dir}[/]src[/]lib.rs \ +[RUNNING] `rustdoc --test {dir}/src/lib.rs \ [..] \ - --extern baz={dir}[/]target[/]debug[/]deps[/]libbar-[..].rlib \ - --extern bar={dir}[/]target[/]debug[/]deps[/]libbar-[..].rlib \ + --extern baz={dir}/target/debug/deps/libbar-[..].rlib \ + --extern bar={dir}/target/debug/deps/libbar-[..].rlib \ [..]` ", dir = foo.root().display(), diff --git a/tests/testsuite/required_features.rs b/tests/testsuite/required_features.rs index 3890aeced..20d420d14 100644 --- a/tests/testsuite/required_features.rs +++ b/tests/testsuite/required_features.rs @@ -337,7 +337,7 @@ fn test_default_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test test ... ok"), @@ -360,7 +360,7 @@ fn test_default_features() { .with_stderr(format!( "\ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]" +[RUNNING] target/debug/deps/foo-[..][EXE]" )) .with_stdout_contains("test test ... ok"), ); @@ -408,7 +408,7 @@ fn test_arg_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test test ... ok"), @@ -453,7 +453,7 @@ fn test_multiple_required_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo_2-[..][EXE]", +[RUNNING] target/debug/deps/foo_2-[..][EXE]", p.url() )) .with_stdout_contains("test test ... ok"), @@ -467,8 +467,8 @@ fn test_multiple_required_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo_1-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]foo_2-[..][EXE]", +[RUNNING] target/debug/deps/foo_1-[..][EXE] +[RUNNING] target/debug/deps/foo_2-[..][EXE]", p.url() )) .with_stdout_contains_n("test test ... ok", 2), @@ -529,7 +529,7 @@ fn bench_default_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test bench ... bench: [..]"), @@ -550,7 +550,7 @@ fn bench_default_features() { .with_stderr(format!( "\ [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]" +[RUNNING] target/release/deps/foo-[..][EXE]" )) .with_stdout_contains("test bench ... bench: [..]"), ); @@ -611,7 +611,7 @@ fn bench_arg_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test bench ... bench: [..]"), @@ -678,7 +678,7 @@ fn bench_multiple_required_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo_2-[..][EXE]", +[RUNNING] target/release/deps/foo_2-[..][EXE]", p.url() )) .with_stdout_contains("test bench ... bench: [..]"), @@ -692,8 +692,8 @@ fn bench_multiple_required_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo_1-[..][EXE] -[RUNNING] target[/]release[/]deps[/]foo_2-[..][EXE]", +[RUNNING] target/release/deps/foo_1-[..][EXE] +[RUNNING] target/release/deps/foo_2-[..][EXE]", p.url() )) .with_stdout_contains_n("test bench ... bench: [..]", 2), @@ -973,7 +973,7 @@ fn dep_feature_in_toml() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test test ... ok"), @@ -990,7 +990,7 @@ fn dep_feature_in_toml() { [COMPILING] bar v0.0.1 ({0}/bar) [COMPILING] foo v0.0.1 ({0}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test bench ... bench: [..]"), @@ -1126,7 +1126,7 @@ Consider enabling them by passing e.g. `--features=\"bar/a\"` "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test test ... ok"), @@ -1154,7 +1154,7 @@ Consider enabling them by passing e.g. `--features=\"bar/a\"` [COMPILING] bar v0.0.1 ({0}/bar) [COMPILING] foo v0.0.1 ({0}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test bench ... bench: [..]"), @@ -1215,7 +1215,7 @@ fn test_skips_compiling_bin_with_missing_required_features() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("running 0 tests"), @@ -1244,7 +1244,7 @@ error[E0463]: can't find crate for `bar`", "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] target[/]release[/]deps[/]foo-[..][EXE]", +[RUNNING] target/release/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("running 0 tests"), diff --git a/tests/testsuite/run.rs b/tests/testsuite/run.rs index 6f6407207..473b26894 100644 --- a/tests/testsuite/run.rs +++ b/tests/testsuite/run.rs @@ -17,7 +17,7 @@ fn simple() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]foo[EXE]`", +[RUNNING] `target/debug/foo[EXE]`", dir = path2url(p.root()) )) .with_stdout("hello"), @@ -213,10 +213,10 @@ fn specify_name() { .with_stderr(&format!( "\ [COMPILING] foo v0.0.1 ({dir}) -[RUNNING] `rustc [..] src[/]lib.rs [..]` -[RUNNING] `rustc [..] src[/]bin[/]a.rs [..]` +[RUNNING] `rustc [..] src/lib.rs [..]` +[RUNNING] `rustc [..] src/bin/a.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]a[EXE]`", +[RUNNING] `target/debug/a[EXE]`", dir = path2url(p.root()) )) .with_stdout("hello a.rs"), @@ -229,9 +229,9 @@ fn specify_name() { .with_stderr( "\ [COMPILING] foo v0.0.1 ([..]) -[RUNNING] `rustc [..] src[/]bin[/]b.rs [..]` +[RUNNING] `rustc [..] src/bin/b.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]b[EXE]`", +[RUNNING] `target/debug/b[EXE]`", ) .with_stdout("hello b.rs"), ); @@ -371,7 +371,7 @@ fn run_example() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]examples[/]a[EXE]`", +[RUNNING] `target/debug/examples/a[EXE]`", dir = path2url(p.root()) )) .with_stdout("example"), @@ -498,7 +498,7 @@ fn run_example_autodiscover_2015_with_autoexamples_enabled() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]examples[/]a[EXE]`", +[RUNNING] `target/debug/examples/a[EXE]`", dir = path2url(p.root()) )) .with_stdout("example"), @@ -541,7 +541,7 @@ fn run_example_autodiscover_2018() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]examples[/]a[EXE]`", +[RUNNING] `target/debug/examples/a[EXE]`", dir = path2url(p.root()) )) .with_stdout("example"), @@ -651,7 +651,7 @@ fn one_bin_multiple_examples() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]main[EXE]`", +[RUNNING] `target/debug/main[EXE]`", dir = path2url(p.root()) )) .with_stdout("hello main.rs"), @@ -715,22 +715,22 @@ fn example_with_release_flag() { .with_stderr(&format!( "\ [COMPILING] bar v0.5.0 ({url}/bar) -[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \ +[RUNNING] `rustc --crate-name bar bar/src/bar.rs --crate-type lib \ --emit=dep-info,link \ -C opt-level=3 \ -C metadata=[..] \ - --out-dir {dir}[/]target[/]release[/]deps \ - -L dependency={dir}[/]target[/]release[/]deps` + --out-dir {dir}/target/release/deps \ + -L dependency={dir}/target/release/deps` [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \ +[RUNNING] `rustc --crate-name a examples/a.rs --crate-type bin \ --emit=dep-info,link \ -C opt-level=3 \ -C metadata=[..] \ - --out-dir {dir}[/]target[/]release[/]examples \ - -L dependency={dir}[/]target[/]release[/]deps \ - --extern bar={dir}[/]target[/]release[/]deps[/]libbar-[..].rlib` + --out-dir {dir}/target/release/examples \ + -L dependency={dir}/target/release/deps \ + --extern bar={dir}/target/release/deps/libbar-[..].rlib` [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `target[/]release[/]examples[/]a[EXE]` +[RUNNING] `target/release/examples/a[EXE]` ", dir = p.root().display(), url = path2url(p.root()), @@ -749,22 +749,22 @@ fast2", .with_stderr(&format!( "\ [COMPILING] bar v0.5.0 ({url}/bar) -[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \ +[RUNNING] `rustc --crate-name bar bar/src/bar.rs --crate-type lib \ --emit=dep-info,link \ -C debuginfo=2 \ -C metadata=[..] \ - --out-dir {dir}[/]target[/]debug[/]deps \ - -L dependency={dir}[/]target[/]debug[/]deps` + --out-dir {dir}/target/debug/deps \ + -L dependency={dir}/target/debug/deps` [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \ +[RUNNING] `rustc --crate-name a examples/a.rs --crate-type bin \ --emit=dep-info,link \ -C debuginfo=2 \ -C metadata=[..] \ - --out-dir {dir}[/]target[/]debug[/]examples \ - -L dependency={dir}[/]target[/]debug[/]deps \ - --extern bar={dir}[/]target[/]debug[/]deps[/]libbar-[..].rlib` + --out-dir {dir}/target/debug/examples \ + -L dependency={dir}/target/debug/deps \ + --extern bar={dir}/target/debug/deps/libbar-[..].rlib` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `target[/]debug[/]examples[/]a[EXE]` +[RUNNING] `target/debug/examples/a[EXE]` ", dir = p.root().display(), url = path2url(p.root()), @@ -832,7 +832,7 @@ fn release_works() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `target[/]release[/]foo[EXE]` +[RUNNING] `target/release/foo[EXE]` ", dir = path2url(p.root()), )), @@ -900,7 +900,7 @@ fn run_from_executable_folder() { .with_stderr( "\ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]\n\ - [RUNNING] `.[/]foo[EXE]`", + [RUNNING] `./foo[EXE]`", ) .with_stdout("hello"), ); diff --git a/tests/testsuite/rustc.rs b/tests/testsuite/rustc.rs index d5406d4d7..f5ce0d40e 100644 --- a/tests/testsuite/rustc.rs +++ b/tests/testsuite/rustc.rs @@ -17,11 +17,11 @@ fn build_lib_for_foo() { execs().with_status(0).with_stderr(format!( "\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -47,12 +47,12 @@ fn lib() { execs().with_status(0).with_stderr(format!( "\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C debug-assertions=off \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -73,18 +73,18 @@ fn build_main_and_allow_unstable_options() { execs().with_status(0).with_stderr(&format!( "\ [COMPILING] {name} v{version} ({url}) -[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib \ +[RUNNING] `rustc --crate-name {name} src/lib.rs --crate-type lib \ --emit=dep-info,link -C debuginfo=2 \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps` -[RUNNING] `rustc --crate-name {name} src[/]main.rs --crate-type bin \ + -L dependency={dir}/target/debug/deps` +[RUNNING] `rustc --crate-name {name} src/main.rs --crate-type bin \ --emit=dep-info,link -C debuginfo=2 \ -C debug-assertions \ -C metadata=[..] \ --out-dir [..] \ - -L dependency={dir}[/]target[/]debug[/]deps \ - --extern {name}={dir}[/]target[/]debug[/]deps[/]lib{name}-[..].rlib` + -L dependency={dir}/target/debug/deps \ + --extern {name}={dir}/target/debug/deps/lib{name}-[..].rlib` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -126,10 +126,10 @@ fn build_with_args_to_one_of_multiple_binaries() { execs().with_status(0).with_stderr(format!( "\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link \ -C debuginfo=2 -C metadata=[..] \ --out-dir [..]` -[RUNNING] `rustc --crate-name bar src[/]bin[/]bar.rs --crate-type bin --emit=dep-info,link \ +[RUNNING] `rustc --crate-name bar src/bin/bar.rs --crate-type bin --emit=dep-info,link \ -C debuginfo=2 -C debug-assertions [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", @@ -171,10 +171,10 @@ fn build_with_args_to_one_of_multiple_tests() { execs().with_status(0).with_stderr(format!( "\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib --emit=dep-info,link \ +[RUNNING] `rustc --crate-name foo src/lib.rs --crate-type lib --emit=dep-info,link \ -C debuginfo=2 -C metadata=[..] \ --out-dir [..]` -[RUNNING] `rustc --crate-name bar tests[/]bar.rs --emit=dep-info,link -C debuginfo=2 \ +[RUNNING] `rustc --crate-name bar tests/bar.rs --emit=dep-info,link -C debuginfo=2 \ -C debug-assertions [..]--test[..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", @@ -268,15 +268,15 @@ fn targets_selected_default() { execs().with_status(0) // bin .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]") // bench .with_stderr_does_not_contain("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C opt-level=3 --test [..]") // unit test .with_stderr_does_not_contain("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C debuginfo=2 --test [..]"), ); } @@ -291,15 +291,15 @@ fn targets_selected_all() { execs().with_status(0) // bin .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --crate-type bin \ + [RUNNING] `rustc --crate-name foo src/main.rs --crate-type bin \ --emit=dep-info,link[..]") // bench .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C opt-level=3 --test [..]") // unit test .with_stderr_contains("\ - [RUNNING] `rustc --crate-name foo src[/]main.rs --emit=dep-info,link \ + [RUNNING] `rustc --crate-name foo src/main.rs --emit=dep-info,link \ -C debuginfo=2 --test [..]"), ); } @@ -474,12 +474,12 @@ fn rustc_test_with_implicit_bin() { .with_status(0) .with_stderr_contains( "\ -[RUNNING] `rustc --crate-name test1 tests[/]test1.rs [..] --cfg foo [..] +[RUNNING] `rustc --crate-name test1 tests/test1.rs [..] --cfg foo [..] ", ) .with_stderr_contains( "\ -[RUNNING] `rustc --crate-name foo src[/]main.rs [..] +[RUNNING] `rustc --crate-name foo src/main.rs [..] ", ), ); diff --git a/tests/testsuite/rustdoc.rs b/tests/testsuite/rustdoc.rs index 8678496e6..0ddcbc254 100644 --- a/tests/testsuite/rustdoc.rs +++ b/tests/testsuite/rustdoc.rs @@ -12,9 +12,9 @@ fn rustdoc_simple() { execs().with_status(0).with_stderr(format!( "\ [DOCUMENTING] foo v0.0.1 ({url}) -[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \ - -o {dir}[/]target[/]doc \ - -L dependency={dir}[/]target[/]debug[/]deps` +[RUNNING] `rustdoc --crate-name foo src/lib.rs \ + -o {dir}/target/doc \ + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -34,10 +34,10 @@ fn rustdoc_args() { execs().with_status(0).with_stderr(format!( "\ [DOCUMENTING] foo v0.0.1 ({url}) -[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \ - -o {dir}[/]target[/]doc \ +[RUNNING] `rustdoc --crate-name foo src/lib.rs \ + -o {dir}/target/doc \ --cfg=foo \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display(), @@ -73,12 +73,12 @@ fn rustdoc_foo_with_bar_dependency() { execs().with_status(0).with_stderr(format!( "\ [CHECKING] bar v0.0.1 ([..]) -[RUNNING] `rustc [..]bar[/]src[/]lib.rs [..]` +[RUNNING] `rustc [..]bar/src/lib.rs [..]` [DOCUMENTING] foo v0.0.1 ({url}) -[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \ - -o {dir}[/]target[/]doc \ +[RUNNING] `rustdoc --crate-name foo src/lib.rs \ + -o {dir}/target/doc \ --cfg=foo \ - -L dependency={dir}[/]target[/]debug[/]deps \ + -L dependency={dir}/target/debug/deps \ --extern [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", @@ -120,10 +120,10 @@ fn rustdoc_only_bar_dependency() { execs().with_status(0).with_stderr(format!( "\ [DOCUMENTING] bar v0.0.1 ([..]) -[RUNNING] `rustdoc --crate-name bar [..]bar[/]src[/]lib.rs \ - -o {dir}[/]target[/]doc \ +[RUNNING] `rustdoc --crate-name bar [..]bar/src/lib.rs \ + -o {dir}/target/doc \ --cfg=foo \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = foo.root().display() @@ -143,10 +143,10 @@ fn rustdoc_same_name_documents_lib() { execs().with_status(0).with_stderr(format!( "\ [DOCUMENTING] foo v0.0.1 ([..]) -[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \ - -o {dir}[/]target[/]doc \ +[RUNNING] `rustdoc --crate-name foo src/lib.rs \ + -o {dir}/target/doc \ --cfg=foo \ - -L dependency={dir}[/]target[/]debug[/]deps` + -L dependency={dir}/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", dir = p.root().display() @@ -191,11 +191,11 @@ fn rustdoc_target() { p.cargo("rustdoc --verbose --target x86_64-unknown-linux-gnu"), execs().with_status(0).with_stderr("\ [DOCUMENTING] foo v0.0.1 ([..]) -[RUNNING] `rustdoc --crate-name foo src[/]lib.rs \ +[RUNNING] `rustdoc --crate-name foo src/lib.rs \ --target x86_64-unknown-linux-gnu \ - -o [..]foo[/]target[/]x86_64-unknown-linux-gnu[/]doc \ - -L dependency=[..]foo[/]target[/]x86_64-unknown-linux-gnu[/]debug[/]deps \ - -L dependency=[..]foo[/]target[/]debug[/]deps` + -o [..]foo/target/x86_64-unknown-linux-gnu/doc \ + -L dependency=[..]foo/target/x86_64-unknown-linux-gnu/debug/deps \ + -L dependency=[..]foo/target/debug/deps` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]"), ); } diff --git a/tests/testsuite/support/mod.rs b/tests/testsuite/support/mod.rs index e386e732a..fbca18a44 100644 --- a/tests/testsuite/support/mod.rs +++ b/tests/testsuite/support/mod.rs @@ -27,7 +27,7 @@ assert_that( "\ [COMPILING] foo [..] [FINISHED] [..] -[RUNNING] `target[/]debug[/]foo` +[RUNNING] `target/debug/foo` ", ) .with_stdout("hi!"), @@ -71,8 +71,8 @@ if !is_nightly() { ## Platform-specific Notes -When checking output, be sure to use `[/]` when checking paths to -automatically support backslashes on Windows. +When checking output, use `/` for paths even on Windows: the actual output +of `\` on Windows will be replaced with `/`. Be careful when executing binaries on Windows. You should not rename, delete, or overwrite a binary immediately after running it. Under some conditions @@ -831,6 +831,8 @@ impl Execs { // Let's not deal with \r\n vs \n on windows... let actual = actual.replace("\r", ""); let actual = actual.replace("\t", ""); + // or / vs \ + let actual = actual.replace("\\", "/"); match kind { MatchKind::Exact => { @@ -1013,8 +1015,6 @@ enum MatchKind { /// Compare a line with an expected pattern. /// - Use `[..]` as a wildcard to match 0 or more characters on the same line /// (similar to `.*` in a regex). -/// - Use `[/]` for path separators to automatically support backslash on -/// Windows. /// - Use `[EXE]` to optionally add `.exe` on Windows (empty string on other /// platforms). /// - There is a wide range of macros (such as `[COMPILING]` or `[WARNING]`) @@ -1290,7 +1290,6 @@ fn substitute_macros(input: &str) -> String { ("[SUMMARY]", " Summary"), ("[FIXING]", " Fixing"), ("[EXE]", if cfg!(windows) { ".exe" } else { "" }), - ("[/]", if cfg!(windows) { "\\" } else { "/" }), ]; let mut result = input.to_owned(); for &(pat, subst) in macros.iter() { diff --git a/tests/testsuite/test.rs b/tests/testsuite/test.rs index 33826f3c5..18f2677a2 100644 --- a/tests/testsuite/test.rs +++ b/tests/testsuite/test.rs @@ -48,7 +48,7 @@ fn cargo_test_simple() { "\ [COMPILING] foo v0.5.0 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", p.url() )) .with_stdout_contains("test test_hello ... ok"), @@ -106,8 +106,8 @@ fn cargo_test_release() { [RUNNING] [..] -C opt-level=3 [..] [RUNNING] [..] -C opt-level=3 [..] [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `[..]target[/]release[/]deps[/]foo-[..][EXE]` -[RUNNING] `[..]target[/]release[/]deps[/]test-[..][EXE]` +[RUNNING] `[..]target/release/deps/foo-[..][EXE]` +[RUNNING] `[..]target/release/deps/test-[..][EXE]` [DOCTEST] foo [RUNNING] `rustdoc --test [..]lib.rs[..]`", dir = p.url() @@ -180,9 +180,9 @@ fn cargo_test_verbose() { .with_stderr(format!( "\ [COMPILING] foo v0.5.0 ({url}) -[RUNNING] `rustc [..] src[/]main.rs [..]` +[RUNNING] `rustc [..] src/main.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `[..]target[/]debug[/]deps[/]foo-[..][EXE] hello`", +[RUNNING] `[..]target/debug/deps/foo-[..][EXE] hello`", url = p.url() )) .with_stdout_contains("test test_hello ... ok"), @@ -272,7 +272,7 @@ fn cargo_test_failing_test_in_bin() { "\ [COMPILING] foo v0.5.0 ({url}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [ERROR] test failed, to rerun pass '--bin foo'", url = p.url() )) @@ -289,7 +289,7 @@ failures: .with_stdout_contains("[..]`(left == right)`[..]") .with_stdout_contains("[..]left: `\"hello\"`,[..]") .with_stdout_contains("[..]right: `\"nope\"`[..]") - .with_stdout_contains("[..]src[/]main.rs:12[..]") + .with_stdout_contains("[..]src/main.rs:12[..]") .with_stdout_contains( "\ failures: @@ -323,8 +323,8 @@ fn cargo_test_failing_test_in_test() { "\ [COMPILING] foo v0.5.0 ({url}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]footest-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/footest-[..][EXE] [ERROR] test failed, to rerun pass '--test footest'", url = p.url() )) @@ -338,7 +338,7 @@ failures: ---- test_hello stdout ---- [..]thread 'test_hello' panicked at 'assertion failed: false', \ - tests[/]footest.rs:1[..] + tests/footest.rs:1[..] ", ) .with_stdout_contains( @@ -365,7 +365,7 @@ fn cargo_test_failing_test_in_lib() { "\ [COMPILING] foo v0.5.0 ({url}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [ERROR] test failed, to rerun pass '--lib'", url = p.url() )) @@ -377,7 +377,7 @@ failures: ---- test_hello stdout ---- [..]thread 'test_hello' panicked at 'assertion failed: false', \ - src[/]lib.rs:1[..] + src/lib.rs:1[..] ", ) .with_stdout_contains( @@ -443,8 +443,8 @@ fn test_with_lib_dep() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]baz-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/baz-[..][EXE] [DOCTEST] foo", p.url() )) @@ -553,8 +553,8 @@ fn external_test_explicit() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]test-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/test-[..][EXE] [DOCTEST] foo", p.url() )) @@ -617,8 +617,8 @@ fn external_test_implicit() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]external-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/external-[..][EXE] [DOCTEST] foo", p.url() )) @@ -662,7 +662,7 @@ fn pass_through_command_line() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [DOCTEST] foo", dir = p.url() )) @@ -677,7 +677,7 @@ fn pass_through_command_line() { .with_stderr( "\ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [DOCTEST] foo", ) .with_stdout_contains("test foo ... ok") @@ -747,8 +747,8 @@ fn lib_bin_same_name() { "\ [COMPILING] foo v0.0.1 ({}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [DOCTEST] foo", p.url() )) @@ -792,8 +792,8 @@ fn lib_with_standard_name() { "\ [COMPILING] syntax v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]syntax-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]test-[..][EXE] +[RUNNING] target/debug/deps/syntax-[..][EXE] +[RUNNING] target/debug/deps/test-[..][EXE] [DOCTEST] syntax", dir = p.url() )) @@ -842,7 +842,7 @@ fn lib_with_standard_name2() { "\ [COMPILING] syntax v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]syntax-[..][EXE]", +[RUNNING] target/debug/deps/syntax-[..][EXE]", dir = p.url() )) .with_stdout_contains("test test ... ok"), @@ -887,7 +887,7 @@ fn lib_without_name() { "\ [COMPILING] syntax v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]syntax-[..][EXE]", +[RUNNING] target/debug/deps/syntax-[..][EXE]", dir = p.url() )) .with_stdout_contains("test test ... ok"), @@ -1211,8 +1211,8 @@ fn test_dylib() { [COMPILING] bar v0.0.1 ({dir}/bar) [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]test-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/test-[..][EXE]", dir = p.url() )) .with_stdout_contains_n("test foo ... ok", 2), @@ -1226,8 +1226,8 @@ fn test_dylib() { .with_stderr( "\ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]test-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/test-[..][EXE]", ) .with_stdout_contains_n("test foo ... ok", 2), ); @@ -1258,7 +1258,7 @@ fn test_twice_with_build_cmd() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [DOCTEST] foo", dir = p.url() )) @@ -1273,7 +1273,7 @@ fn test_twice_with_build_cmd() { .with_stderr( "\ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [DOCTEST] foo", ) .with_stdout_contains("test foo ... ok") @@ -1295,7 +1295,7 @@ fn test_then_build() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] +[RUNNING] target/debug/deps/foo-[..][EXE] [DOCTEST] foo", dir = p.url() )) @@ -1356,7 +1356,7 @@ fn test_run_specific_bin_target() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]bin2-[..][EXE]", +[RUNNING] target/debug/deps/bin2-[..][EXE]", dir = prj.url() )) .with_stdout_contains("test test2 ... ok"), @@ -1401,7 +1401,7 @@ fn test_run_implicit_bin_target() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]mybin-[..][EXE]", +[RUNNING] target/debug/deps/mybin-[..][EXE]", dir = prj.url() )) .with_stdout_contains("test test_in_bin ... ok"), @@ -1425,7 +1425,7 @@ fn test_run_specific_test_target() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]b-[..][EXE]", +[RUNNING] target/debug/deps/b-[..][EXE]", dir = prj.url() )) .with_stdout_contains("test test_b ... ok"), @@ -1469,8 +1469,8 @@ fn test_run_implicit_test_target() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]mybin-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]mytest-[..][EXE]", +[RUNNING] target/debug/deps/mybin-[..][EXE] +[RUNNING] target/debug/deps/mytest-[..][EXE]", dir = prj.url() )) .with_stdout_contains("test test_in_test ... ok"), @@ -1514,8 +1514,8 @@ fn test_run_implicit_bench_target() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]mybin-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]mybench-[..][EXE]", +[RUNNING] target/debug/deps/mybin-[..][EXE] +[RUNNING] target/debug/deps/mybench-[..][EXE]", dir = prj.url() )) .with_stdout_contains("test test_in_bench ... ok"), @@ -1572,7 +1572,7 @@ fn test_run_implicit_example_target() { .with_stderr_contains("[RUNNING] `rustc [..]myexm1.rs --crate-type bin[..]") .with_stderr_contains("[RUNNING] `rustc [..]myexm2.rs [..]--test[..]") .with_stderr_does_not_contain("[RUNNING] [..]myexm1-[..]") - .with_stderr_contains("[RUNNING] [..]target[/]debug[/]examples[/]myexm2-[..]"), + .with_stderr_contains("[RUNNING] [..]target/debug/examples/myexm2-[..]"), ); // Only tests myexm2. @@ -1581,7 +1581,7 @@ fn test_run_implicit_example_target() { execs() .with_status(0) .with_stderr_does_not_contain("[RUNNING] [..]myexm1-[..]") - .with_stderr_contains("[RUNNING] [..]target[/]debug[/]examples[/]myexm2-[..]"), + .with_stderr_contains("[RUNNING] [..]target/debug/examples/myexm2-[..]"), ); // Tests all examples. @@ -1589,8 +1589,8 @@ fn test_run_implicit_example_target() { prj.cargo("test --examples"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] [..]target[/]debug[/]examples[/]myexm1-[..]") - .with_stderr_contains("[RUNNING] [..]target[/]debug[/]examples[/]myexm2-[..]"), + .with_stderr_contains("[RUNNING] [..]target/debug/examples/myexm1-[..]") + .with_stderr_contains("[RUNNING] [..]target/debug/examples/myexm2-[..]"), ); // Test an example, even without `test` set. @@ -1598,7 +1598,7 @@ fn test_run_implicit_example_target() { prj.cargo("test --example myexm1"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] [..]target[/]debug[/]examples[/]myexm1-[..]"), + .with_stderr_contains("[RUNNING] [..]target/debug/examples/myexm1-[..]"), ); // Tests all examples. @@ -1606,8 +1606,8 @@ fn test_run_implicit_example_target() { prj.cargo("test --all-targets"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] [..]target[/]debug[/]examples[/]myexm1-[..]") - .with_stderr_contains("[RUNNING] [..]target[/]debug[/]examples[/]myexm2-[..]"), + .with_stderr_contains("[RUNNING] [..]target/debug/examples/myexm1-[..]") + .with_stderr_contains("[RUNNING] [..]target/debug/examples/myexm2-[..]"), ); } @@ -1642,7 +1642,7 @@ fn test_no_harness() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]bar-[..][EXE] +[RUNNING] target/debug/deps/bar-[..][EXE] ", dir = p.url() )), @@ -1718,8 +1718,8 @@ fn selective_testing() { "\ [COMPILING] d1 v0.0.1 ({dir}/d1) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]d1-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]d1-[..][EXE]", +[RUNNING] target/debug/deps/d1-[..][EXE] +[RUNNING] target/debug/deps/d1-[..][EXE]", dir = p.url() )) .with_stdout_contains_n("running 0 tests", 2), @@ -1734,8 +1734,8 @@ fn selective_testing() { "\ [COMPILING] d2 v0.0.1 ({dir}/d2) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]d2-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]d2-[..][EXE]", +[RUNNING] target/debug/deps/d2-[..][EXE] +[RUNNING] target/debug/deps/d2-[..][EXE]", dir = p.url() )) .with_stdout_contains_n("running 0 tests", 2), @@ -1750,7 +1750,7 @@ fn selective_testing() { "\ [COMPILING] foo v0.0.1 ({dir}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE]", dir = p.url() )) .with_stdout_contains("running 0 tests"), @@ -1939,7 +1939,7 @@ fn selective_testing_with_docs() { "\ [COMPILING] d1 v0.0.1 ({dir}/d1) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]d1[..][EXE] +[RUNNING] target/debug/deps/d1[..][EXE] [DOCTEST] d1", dir = p.url() )) @@ -2118,7 +2118,7 @@ fn doctest_feature() { "\ [COMPILING] foo [..] [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo[..][EXE] +[RUNNING] target/debug/deps/foo[..][EXE] [DOCTEST] foo", ) .with_stdout_contains("running 0 tests") @@ -2198,7 +2198,7 @@ fn filter_no_doc_tests() { "\ [COMPILING] foo v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo[..][EXE]", +[RUNNING] target/debug/deps/foo[..][EXE]", ) .with_stdout_contains("running 0 tests"), ); @@ -2330,7 +2330,7 @@ fn cyclic_dev_dep_doc_test() { [COMPILING] foo v0.0.1 ([..]) [COMPILING] bar v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo[..][EXE] +[RUNNING] target/debug/deps/foo[..][EXE] [DOCTEST] foo", ) .with_stdout_contains("running 0 tests") @@ -2428,13 +2428,13 @@ fn no_fail_fast() { "\ [COMPILING] foo v0.0.1 ([..]) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..][EXE] -[RUNNING] target[/]debug[/]deps[/]test_add_one-[..][EXE]", +[RUNNING] target/debug/deps/foo-[..][EXE] +[RUNNING] target/debug/deps/test_add_one-[..][EXE]", ) .with_stdout_contains("running 0 tests") .with_stderr_contains( "\ -[RUNNING] target[/]debug[/]deps[/]test_sub_one-[..][EXE] +[RUNNING] target/debug/deps/test_sub_one-[..][EXE] [DOCTEST] foo", ) .with_stdout_contains("test result: FAILED. [..]") @@ -2499,8 +2499,8 @@ fn test_multiple_packages() { p.cargo("test").arg("-p").arg("d1").arg("-p").arg("d2"), execs() .with_status(0) - .with_stderr_contains("[RUNNING] target[/]debug[/]deps[/]d1-[..][EXE]") - .with_stderr_contains("[RUNNING] target[/]debug[/]deps[/]d2-[..][EXE]") + .with_stderr_contains("[RUNNING] target/debug/deps/d1-[..][EXE]") + .with_stderr_contains("[RUNNING] target/debug/deps/d2-[..][EXE]") .with_stdout_contains_n("running 0 tests", 2), ); } @@ -2526,8 +2526,8 @@ fn bin_does_not_rebuild_tests() { execs().with_status(0).with_stderr( "\ [COMPILING] foo v0.0.1 ([..]) -[RUNNING] `rustc [..] src[/]main.rs [..]` -[RUNNING] `rustc [..] src[/]main.rs [..]` +[RUNNING] `rustc [..] src/main.rs [..]` +[RUNNING] `rustc [..] src/main.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -2594,8 +2594,8 @@ fn selective_test_optional_dep() { execs().with_status(0).with_stderr( "\ [COMPILING] a v0.0.1 ([..]) -[RUNNING] `rustc [..] a[/]src[/]lib.rs [..]` -[RUNNING] `rustc [..] a[/]src[/]lib.rs [..]` +[RUNNING] `rustc [..] a/src/lib.rs [..]` +[RUNNING] `rustc [..] a/src/lib.rs [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] ", ), @@ -3132,8 +3132,8 @@ fn test_many_targets() { .with_stdout_contains("test bin_b ... ok") .with_stdout_contains("test test_a ... ok") .with_stdout_contains("test test_b ... ok") - .with_stderr_contains("[RUNNING] `rustc --crate-name a examples[/]a.rs [..]`") - .with_stderr_contains("[RUNNING] `rustc --crate-name b examples[/]b.rs [..]`"), + .with_stderr_contains("[RUNNING] `rustc --crate-name a examples/a.rs [..]`") + .with_stderr_contains("[RUNNING] `rustc --crate-name b examples/b.rs [..]`"), ) } @@ -3517,7 +3517,7 @@ fn json_artifact_includes_test_flag() { "name":"foo", "src_path":"[..]lib.rs" }, - "filenames":["[..][/]foo-[..]"], + "filenames":["[..]/foo-[..]"], "fresh": false } "#, @@ -3587,7 +3587,7 @@ fn doctest_skip_staticlib() { "\ [COMPILING] foo [..] [FINISHED] dev [..] -[RUNNING] target[/]debug[/]deps[/]foo-[..]", +[RUNNING] target/debug/deps/foo-[..]", ), ) } diff --git a/tests/testsuite/tool_paths.rs b/tests/testsuite/tool_paths.rs index 9250307f1..57bc5c83c 100644 --- a/tests/testsuite/tool_paths.rs +++ b/tests/testsuite/tool_paths.rs @@ -179,7 +179,7 @@ fn custom_runner() { "\ [COMPILING] foo v0.0.1 ({url}) [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `nonexistent-runner -r target[/]debug[/]foo[EXE] --param` +[RUNNING] `nonexistent-runner -r target/debug/foo[EXE] --param` ", url = p.url() )), @@ -193,7 +193,7 @@ fn custom_runner() { [COMPILING] foo v0.0.1 ({url}) [RUNNING] `rustc [..]` [FINISHED] dev [unoptimized + debuginfo] target(s) in [..] -[RUNNING] `nonexistent-runner -r [..][/]target[/]debug[/]deps[/]test-[..][EXE] --param` +[RUNNING] `nonexistent-runner -r [..]/target/debug/deps/test-[..][EXE] --param` ", url = p.url() )), @@ -208,7 +208,7 @@ fn custom_runner() { [RUNNING] `rustc [..]` [RUNNING] `rustc [..]` [FINISHED] release [optimized] target(s) in [..] -[RUNNING] `nonexistent-runner -r [..][/]target[/]release[/]deps[/]bench-[..][EXE] --param --bench` +[RUNNING] `nonexistent-runner -r [..]/target/release/deps/bench-[..][EXE] --param --bench` ", url = p.url() )),