diff --git a/Cargo.lock b/Cargo.lock index 72b958c26889..80fdf1a89d44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3132,9 +3132,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snapbox" -version = "0.4.16" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73145a30df4935f50a7b13c1882bce7d194d7071ad0bcc36e7cacbf9ef16e3ec" +checksum = "8269b717f21b142c0377f1e617e80999e3ef6b1c010959b44fd93320722d2cba" dependencies = [ "anstream", "anstyle", @@ -3151,9 +3151,9 @@ dependencies = [ [[package]] name = "snapbox-macros" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ccde059aad940984ff696fe8c280900f7ea71a6fb45fce65071a3f2c40b667" +checksum = "e1c4b838b05d15ab22754068cb73500b2f3b07bf09d310e15b27f88160f1de40" dependencies = [ "anstream", ] diff --git a/Cargo.toml b/Cargo.toml index 0d4ea2dfdab7..63b99dbc4f51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,7 +91,7 @@ sha1 = "0.10.6" sha2 = "0.10.8" shell-escape = "0.1.5" supports-hyperlinks = "2.1.0" -snapbox = { version = "0.4.16", features = ["diff", "path"] } +snapbox = { version = "0.5.0", features = ["diff", "path"] } tar = { version = "0.4.40", default-features = false } tempfile = "3.9.0" thiserror = "1.0.56" diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs index cbf793f0d0dd..184f79916a6d 100644 --- a/crates/cargo-test-support/src/lib.rs +++ b/crates/cargo-test-support/src/lib.rs @@ -35,25 +35,8 @@ macro_rules! t { }; } -#[macro_export] -macro_rules! curr_dir { - () => { - $crate::_curr_dir(std::path::Path::new(file!())); - }; -} - -#[doc(hidden)] -pub fn _curr_dir(mut file_path: &'static Path) -> &'static Path { - if !file_path.exists() { - // HACK: Must be running in the rust-lang/rust workspace, adjust the paths accordingly. - let prefix = PathBuf::from("src").join("tools").join("cargo"); - if let Ok(crate_relative) = file_path.strip_prefix(prefix) { - file_path = crate_relative - } - } - assert!(file_path.exists(), "{} does not exist", file_path.display()); - file_path.parent().unwrap() -} +pub use snapbox::file; +pub use snapbox::path::current_dir; #[track_caller] pub fn panic_error(what: &str, err: impl Into) -> ! { diff --git a/tests/testsuite/cargo/help/mod.rs b/tests/testsuite/cargo/help/mod.rs index 559377b278ac..a3568fe3e271 100644 --- a/tests/testsuite/cargo/help/mod.rs +++ b/tests/testsuite/cargo/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -7,6 +7,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo/z_help/mod.rs b/tests/testsuite/cargo/z_help/mod.rs index cca503d70d92..c1dbe1fa304c 100644 --- a/tests/testsuite/cargo/z_help/mod.rs +++ b/tests/testsuite/cargo/z_help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .args(["-Z", "help"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_add/add_basic/mod.rs b/tests/testsuite/cargo_add/add_basic/mod.rs index 67cd948ae83e..e7bf45e86b5c 100644 --- a/tests/testsuite/cargo_add/add_basic/mod.rs +++ b/tests/testsuite/cargo_add/add_basic/mod.rs @@ -1,9 +1,9 @@ use cargo_test_support::compare::assert_ui; +use cargo_test_support::current_dir; +use cargo_test_support::file; use cargo_test_support::prelude::*; use cargo_test_support::Project; -use cargo_test_support::curr_dir; - #[cargo_test] fn case() { cargo_test_support::registry::init(); @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/add_multiple/mod.rs b/tests/testsuite/cargo_add/add_multiple/mod.rs index ce5e9b71d416..a31884ea5ebd 100644 --- a/tests/testsuite/cargo_add/add_multiple/mod.rs +++ b/tests/testsuite/cargo_add/add_multiple/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs b/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs index ced39b99c223..5ec42328b534 100644 --- a/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs +++ b/tests/testsuite/cargo_add/add_normalized_name_external/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -24,7 +24,7 @@ fn case() { .feature("unstable", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -34,8 +34,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/add_toolchain/mod.rs b/tests/testsuite/cargo_add/add_toolchain/mod.rs index 905b8c8a2de1..a94497b2a6dc 100644 --- a/tests/testsuite/cargo_add/add_toolchain/mod.rs +++ b/tests/testsuite/cargo_add/add_toolchain/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -16,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/build/mod.rs b/tests/testsuite/cargo_add/build/mod.rs index 001dd3a8f483..fe8eff5fe21b 100644 --- a/tests/testsuite/cargo_add/build/mod.rs +++ b/tests/testsuite/cargo_add/build/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs b/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs index 285ec658a5ff..25462d5ec91a 100644 --- a/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs +++ b/tests/testsuite/cargo_add/build_prefer_existing_version/mod.rs @@ -1,4 +1,6 @@ use cargo_test_support::compare::assert_ui; +use cargo_test_support::current_dir; +use cargo_test_support::file; use cargo_test_support::prelude::*; use cargo_test_support::Project; @@ -19,8 +21,7 @@ fn case() { .publish(); } - let project = - Project::from_template("tests/testsuite/cargo_add/build_prefer_existing_version/in"); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,11 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path("tests/testsuite/cargo_add/build_prefer_existing_version/stdout.log") - .stderr_matches_path("tests/testsuite/cargo_add/build_prefer_existing_version/stderr.log"); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches( - "tests/testsuite/cargo_add/build_prefer_existing_version/out", - &project_root, - ); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/change_rename_target/mod.rs b/tests/testsuite/cargo_add/change_rename_target/mod.rs index d1540c8ad1d5..4c00aee20408 100644 --- a/tests/testsuite/cargo_add/change_rename_target/mod.rs +++ b/tests/testsuite/cargo_add/change_rename_target/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/cyclic_features/mod.rs b/tests/testsuite/cargo_add/cyclic_features/mod.rs index 8b4c6123a5e3..d53de3911b20 100644 --- a/tests/testsuite/cargo_add/cyclic_features/mod.rs +++ b/tests/testsuite/cargo_add/cyclic_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -13,7 +13,7 @@ fn case() { .feature("feature-two", &["feature-one"]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -23,8 +23,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/default_features/mod.rs b/tests/testsuite/cargo_add/default_features/mod.rs index 9d313b9d9faa..24f2bc9f15ee 100644 --- a/tests/testsuite/cargo_add/default_features/mod.rs +++ b/tests/testsuite/cargo_add/default_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/deprecated_default_features/mod.rs b/tests/testsuite/cargo_add/deprecated_default_features/mod.rs index c4fdd4f3e31b..260f778048be 100644 --- a/tests/testsuite/cargo_add/deprecated_default_features/mod.rs +++ b/tests/testsuite/cargo_add/deprecated_default_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(&cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/deprecated_section/mod.rs b/tests/testsuite/cargo_add/deprecated_section/mod.rs index c4fdd4f3e31b..260f778048be 100644 --- a/tests/testsuite/cargo_add/deprecated_section/mod.rs +++ b/tests/testsuite/cargo_add/deprecated_section/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(&cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs b/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs index 2b9550ce0a32..9a9b1d9d1b53 100644 --- a/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs +++ b/tests/testsuite/cargo_add/detect_workspace_inherit/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs b/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs index 8067166dc9ec..b8d524e13e03 100644 --- a/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs +++ b/tests/testsuite/cargo_add/detect_workspace_inherit_features/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs b/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs index 423f1a26d43c..91d198de4cda 100644 --- a/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs +++ b/tests/testsuite/cargo_add/detect_workspace_inherit_optional/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/detect_workspace_inherit_public/mod.rs b/tests/testsuite/cargo_add/detect_workspace_inherit_public/mod.rs index 680d4c4e3d0c..0e5320ab110e 100644 --- a/tests/testsuite/cargo_add/detect_workspace_inherit_public/mod.rs +++ b/tests/testsuite/cargo_add/detect_workspace_inherit_public/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/dev/mod.rs b/tests/testsuite/cargo_add/dev/mod.rs index c838f1eac41b..9ac88ba51cac 100644 --- a/tests/testsuite/cargo_add/dev/mod.rs +++ b/tests/testsuite/cargo_add/dev/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/dev_build_conflict/mod.rs b/tests/testsuite/cargo_add/dev_build_conflict/mod.rs index 70432b52961b..696188f5d13f 100644 --- a/tests/testsuite/cargo_add/dev_build_conflict/mod.rs +++ b/tests/testsuite/cargo_add/dev_build_conflict/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs b/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs index 2d3698c14734..199e94124857 100644 --- a/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs +++ b/tests/testsuite/cargo_add/dev_prefer_existing_version/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/dry_run/mod.rs b/tests/testsuite/cargo_add/dry_run/mod.rs index 438ec7b73e0e..6e91fc4bd042 100644 --- a/tests/testsuite/cargo_add/dry_run/mod.rs +++ b/tests/testsuite/cargo_add/dry_run/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/empty_dep_name/mod.rs b/tests/testsuite/cargo_add/empty_dep_name/mod.rs index d7044ee11789..28a0de255997 100644 --- a/tests/testsuite/cargo_add/empty_dep_name/mod.rs +++ b/tests/testsuite/cargo_add/empty_dep_name/mod.rs @@ -1,13 +1,13 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -17,8 +17,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/empty_dep_table/mod.rs b/tests/testsuite/cargo_add/empty_dep_table/mod.rs index d612a07f7c84..ad545e8cf2ba 100644 --- a/tests/testsuite/cargo_add/empty_dep_table/mod.rs +++ b/tests/testsuite/cargo_add/empty_dep_table/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features/mod.rs b/tests/testsuite/cargo_add/features/mod.rs index aebae9b3b4eb..af26c43d9532 100644 --- a/tests/testsuite/cargo_add/features/mod.rs +++ b/tests/testsuite/cargo_add/features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_activated_over_limit/mod.rs b/tests/testsuite/cargo_add/features_activated_over_limit/mod.rs index 467e9a681c12..c1b6e5515b85 100644 --- a/tests/testsuite/cargo_add/features_activated_over_limit/mod.rs +++ b/tests/testsuite/cargo_add/features_activated_over_limit/mod.rs @@ -2,8 +2,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; use itertools::Itertools; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +18,7 @@ fn case() { } test_package.publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_deactivated_over_limit/mod.rs b/tests/testsuite/cargo_add/features_deactivated_over_limit/mod.rs index b2ed6f87d860..10e4616e131c 100644 --- a/tests/testsuite/cargo_add/features_deactivated_over_limit/mod.rs +++ b/tests/testsuite/cargo_add/features_deactivated_over_limit/mod.rs @@ -2,8 +2,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; use itertools::Itertools; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +18,7 @@ fn case() { } test_package.publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_empty/mod.rs b/tests/testsuite/cargo_add/features_empty/mod.rs index d58c6a292c05..c120abe38e77 100644 --- a/tests/testsuite/cargo_add/features_empty/mod.rs +++ b/tests/testsuite/cargo_add/features_empty/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs b/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs index 4189be7ea25f..b97a53795da0 100644 --- a/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs +++ b/tests/testsuite/cargo_add/features_multiple_occurrences/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_preserve/mod.rs b/tests/testsuite/cargo_add/features_preserve/mod.rs index 708fb4ddf136..177b64118c26 100644 --- a/tests/testsuite/cargo_add/features_preserve/mod.rs +++ b/tests/testsuite/cargo_add/features_preserve/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_spaced_values/mod.rs b/tests/testsuite/cargo_add/features_spaced_values/mod.rs index 4ee48311034d..fcd27b1262a8 100644 --- a/tests/testsuite/cargo_add/features_spaced_values/mod.rs +++ b/tests/testsuite/cargo_add/features_spaced_values/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_unknown/mod.rs b/tests/testsuite/cargo_add/features_unknown/mod.rs index 552319402f40..e3906bdc6db0 100644 --- a/tests/testsuite/cargo_add/features_unknown/mod.rs +++ b/tests/testsuite/cargo_add/features_unknown/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs b/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs index dff50a61f162..99f9ef0d344d 100644 --- a/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs +++ b/tests/testsuite/cargo_add/features_unknown_no_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git/mod.rs b/tests/testsuite/cargo_add/git/mod.rs index 507fb417d162..79336d58c2e5 100644 --- a/tests/testsuite/cargo_add/git/mod.rs +++ b/tests/testsuite/cargo_add/git/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -27,8 +27,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_branch/mod.rs b/tests/testsuite/cargo_add/git_branch/mod.rs index 8235a7c3c08a..db407d5cf025 100644 --- a/tests/testsuite/cargo_add/git_branch/mod.rs +++ b/tests/testsuite/cargo_add/git_branch/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let (git_dep, git_repo) = cargo_test_support::git::new_repo("git-package", |project| { @@ -30,8 +30,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs b/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs index 86b268b59f13..8c2894f10f95 100644 --- a/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs +++ b/tests/testsuite/cargo_add/git_conflicts_namever/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -33,8 +33,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_dev/mod.rs b/tests/testsuite/cargo_add/git_dev/mod.rs index 96be4f46ee53..497ca2d1383d 100644 --- a/tests/testsuite/cargo_add/git_dev/mod.rs +++ b/tests/testsuite/cargo_add/git_dev/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -27,8 +27,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_inferred_name/mod.rs b/tests/testsuite/cargo_add/git_inferred_name/mod.rs index 4a3ded8c2f47..58a52793566a 100644 --- a/tests/testsuite/cargo_add/git_inferred_name/mod.rs +++ b/tests/testsuite/cargo_add/git_inferred_name/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -27,8 +27,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs b/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs index a915f34723b7..6d9a3e31aed5 100644 --- a/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs +++ b/tests/testsuite/cargo_add/git_inferred_name_multiple/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -67,8 +67,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_multiple_names/mod.rs b/tests/testsuite/cargo_add/git_multiple_names/mod.rs index 3ffe10714d48..1902c400d462 100644 --- a/tests/testsuite/cargo_add/git_multiple_names/mod.rs +++ b/tests/testsuite/cargo_add/git_multiple_names/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -45,8 +45,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_multiple_packages_features/mod.rs b/tests/testsuite/cargo_add/git_multiple_packages_features/mod.rs index eb76b6f3450a..21a423eeb45c 100644 --- a/tests/testsuite/cargo_add/git_multiple_packages_features/mod.rs +++ b/tests/testsuite/cargo_add/git_multiple_packages_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -26,7 +26,7 @@ fn case() { target_feature = [] "#; - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -56,8 +56,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_normalized_name/mod.rs b/tests/testsuite/cargo_add/git_normalized_name/mod.rs index dbad201053df..bf4169f752ba 100644 --- a/tests/testsuite/cargo_add/git_normalized_name/mod.rs +++ b/tests/testsuite/cargo_add/git_normalized_name/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -27,8 +27,8 @@ fn case() { .current_dir(cwd) .assert() .failure() // Fuzzy searching for paths isn't supported at this time - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_registry/mod.rs b/tests/testsuite/cargo_add/git_registry/mod.rs index e44d71470b3c..be5e2e0f743c 100644 --- a/tests/testsuite/cargo_add/git_registry/mod.rs +++ b/tests/testsuite/cargo_add/git_registry/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("versioned-package", |project| { @@ -46,8 +46,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_rev/mod.rs b/tests/testsuite/cargo_add/git_rev/mod.rs index b8a669c7aedc..16e49ed70f35 100644 --- a/tests/testsuite/cargo_add/git_rev/mod.rs +++ b/tests/testsuite/cargo_add/git_rev/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let (git_dep, git_repo) = cargo_test_support::git::new_repo("git-package", |project| { @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/git_tag/mod.rs b/tests/testsuite/cargo_add/git_tag/mod.rs index 706fc9ab7cfd..32767372a2b1 100644 --- a/tests/testsuite/cargo_add/git_tag/mod.rs +++ b/tests/testsuite/cargo_add/git_tag/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let (git_dep, git_repo) = cargo_test_support::git::new_repo("git-package", |project| { @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/help/mod.rs b/tests/testsuite/cargo_add/help/mod.rs index 0962047f8efb..26c10daafe72 100644 --- a/tests/testsuite/cargo_add/help/mod.rs +++ b/tests/testsuite/cargo_add/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_add/infer_prerelease/mod.rs b/tests/testsuite/cargo_add/infer_prerelease/mod.rs index f2b49376aaa8..1e2d03cf33a7 100644 --- a/tests/testsuite/cargo_add/infer_prerelease/mod.rs +++ b/tests/testsuite/cargo_add/infer_prerelease/mod.rs @@ -1,15 +1,15 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("prerelease_only", "0.2.0-alpha.1").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_arg/mod.rs b/tests/testsuite/cargo_add/invalid_arg/mod.rs index a4e4d268a25f..e9657af03645 100644 --- a/tests/testsuite/cargo_add/invalid_arg/mod.rs +++ b/tests/testsuite/cargo_add/invalid_arg/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_git_name/mod.rs b/tests/testsuite/cargo_add/invalid_git_name/mod.rs index 2f407105d380..7a3d82e3b8bb 100644 --- a/tests/testsuite/cargo_add/invalid_git_name/mod.rs +++ b/tests/testsuite/cargo_add/invalid_git_name/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("git-package", |project| { @@ -27,8 +27,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs b/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs index 837293e5fe71..e28190740a5b 100644 --- a/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs +++ b/tests/testsuite/cargo_add/invalid_key_inherit_dependency/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -16,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs b/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs index 837293e5fe71..e28190740a5b 100644 --- a/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs +++ b/tests/testsuite/cargo_add/invalid_key_overwrite_inherit_dependency/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -16,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs b/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs index bee132560d08..c47ff0808878 100644 --- a/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs +++ b/tests/testsuite/cargo_add/invalid_key_rename_inherit_dependency/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -16,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_manifest/mod.rs b/tests/testsuite/cargo_add/invalid_manifest/mod.rs index 4a2d01765f1e..41feec2a8781 100644 --- a/tests/testsuite/cargo_add/invalid_manifest/mod.rs +++ b/tests/testsuite/cargo_add/invalid_manifest/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_name_external/mod.rs b/tests/testsuite/cargo_add/invalid_name_external/mod.rs index 8cb9b512940d..f49ec0192d4f 100644 --- a/tests/testsuite/cargo_add/invalid_name_external/mod.rs +++ b/tests/testsuite/cargo_add/invalid_name_external/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_path/mod.rs b/tests/testsuite/cargo_add/invalid_path/mod.rs index d8e6a34a6d32..e0e5dab28813 100644 --- a/tests/testsuite/cargo_add/invalid_path/mod.rs +++ b/tests/testsuite/cargo_add/invalid_path/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_path_name/mod.rs b/tests/testsuite/cargo_add/invalid_path_name/mod.rs index aec0880200f2..2fd56acb6dbb 100644 --- a/tests/testsuite/cargo_add/invalid_path_name/mod.rs +++ b/tests/testsuite/cargo_add/invalid_path_name/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_path_self/mod.rs b/tests/testsuite/cargo_add/invalid_path_self/mod.rs index 4bb32531bb64..e13f0ded2bb4 100644 --- a/tests/testsuite/cargo_add/invalid_path_self/mod.rs +++ b/tests/testsuite/cargo_add/invalid_path_self/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_target_empty/mod.rs b/tests/testsuite/cargo_add/invalid_target_empty/mod.rs index 43b3a4a798b6..f1671dedbb3d 100644 --- a/tests/testsuite/cargo_add/invalid_target_empty/mod.rs +++ b/tests/testsuite/cargo_add/invalid_target_empty/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/invalid_vers/mod.rs b/tests/testsuite/cargo_add/invalid_vers/mod.rs index 2ad903d1fff9..b85a25509422 100644 --- a/tests/testsuite/cargo_add/invalid_vers/mod.rs +++ b/tests/testsuite/cargo_add/invalid_vers/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/list_features/mod.rs b/tests/testsuite/cargo_add/list_features/mod.rs index 0dbf824d0d0a..f3077fdb828b 100644 --- a/tests/testsuite/cargo_add/list_features/mod.rs +++ b/tests/testsuite/cargo_add/list_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/list_features_path/mod.rs b/tests/testsuite/cargo_add/list_features_path/mod.rs index e58de1c1d240..379c93bd4168 100644 --- a/tests/testsuite/cargo_add/list_features_path/mod.rs +++ b/tests/testsuite/cargo_add/list_features_path/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -25,7 +25,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -35,8 +35,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs b/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs index 0aa20873e38a..ca0e5b15d10c 100644 --- a/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs +++ b/tests/testsuite/cargo_add/list_features_path_no_default/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -25,7 +25,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -40,8 +40,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/locked_changed/mod.rs b/tests/testsuite/cargo_add/locked_changed/mod.rs index 5de047f57ce2..764d8531a5ae 100644 --- a/tests/testsuite/cargo_add/locked_changed/mod.rs +++ b/tests/testsuite/cargo_add/locked_changed/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/locked_unchanged/mod.rs b/tests/testsuite/cargo_add/locked_unchanged/mod.rs index 613d8c863e58..8ab6c9650649 100644 --- a/tests/testsuite/cargo_add/locked_unchanged/mod.rs +++ b/tests/testsuite/cargo_add/locked_unchanged/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/lockfile_updated/mod.rs b/tests/testsuite/cargo_add/lockfile_updated/mod.rs index 4e99a18ef870..417d14757675 100644 --- a/tests/testsuite/cargo_add/lockfile_updated/mod.rs +++ b/tests/testsuite/cargo_add/lockfile_updated/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/manifest_path_package/mod.rs b/tests/testsuite/cargo_add/manifest_path_package/mod.rs index 768cdb3a3cf6..51adb1fc23df 100644 --- a/tests/testsuite/cargo_add/manifest_path_package/mod.rs +++ b/tests/testsuite/cargo_add/manifest_path_package/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -36,8 +36,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/merge_activated_features/mod.rs b/tests/testsuite/cargo_add/merge_activated_features/mod.rs index 161783282fd4..e3d7832daaa7 100644 --- a/tests/testsuite/cargo_add/merge_activated_features/mod.rs +++ b/tests/testsuite/cargo_add/merge_activated_features/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -16,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs b/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs index 3cdad0e72f77..f7a03f5d1d17 100644 --- a/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs +++ b/tests/testsuite/cargo_add/multiple_conflicts_with_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -25,7 +25,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -35,8 +35,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs b/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs index 9a94dcffa976..8726b230f61c 100644 --- a/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs +++ b/tests/testsuite/cargo_add/multiple_conflicts_with_rename/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/namever/mod.rs b/tests/testsuite/cargo_add/namever/mod.rs index 063072c798cf..bb36d9cd41cc 100644 --- a/tests/testsuite/cargo_add/namever/mod.rs +++ b/tests/testsuite/cargo_add/namever/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/no_args/mod.rs b/tests/testsuite/cargo_add/no_args/mod.rs index aca1e54228b4..bf508535adc3 100644 --- a/tests/testsuite/cargo_add/no_args/mod.rs +++ b/tests/testsuite/cargo_add/no_args/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -17,8 +17,8 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/no_default_features/mod.rs b/tests/testsuite/cargo_add/no_default_features/mod.rs index 8a5d41c8d813..866f7fe6e5f7 100644 --- a/tests/testsuite/cargo_add/no_default_features/mod.rs +++ b/tests/testsuite/cargo_add/no_default_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/no_optional/mod.rs b/tests/testsuite/cargo_add/no_optional/mod.rs index cc7e79b9761c..753710b7f2a6 100644 --- a/tests/testsuite/cargo_add/no_optional/mod.rs +++ b/tests/testsuite/cargo_add/no_optional/mod.rs @@ -1,15 +1,15 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/no_public/mod.rs b/tests/testsuite/cargo_add/no_public/mod.rs index 912ac3fd3a78..2563da1297c8 100644 --- a/tests/testsuite/cargo_add/no_public/mod.rs +++ b/tests/testsuite/cargo_add/no_public/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .masquerade_as_nightly_cargo(&["public-dependency"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/offline_empty_cache/mod.rs b/tests/testsuite/cargo_add/offline_empty_cache/mod.rs index 055b6a8a2abb..5de90164df02 100644 --- a/tests/testsuite/cargo_add/offline_empty_cache/mod.rs +++ b/tests/testsuite/cargo_add/offline_empty_cache/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/optional/mod.rs b/tests/testsuite/cargo_add/optional/mod.rs index 8daaa961d795..490425d24e47 100644 --- a/tests/testsuite/cargo_add/optional/mod.rs +++ b/tests/testsuite/cargo_add/optional/mod.rs @@ -1,15 +1,15 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_default_features/mod.rs index 9d313b9d9faa..24f2bc9f15ee 100644 --- a/tests/testsuite/cargo_add/overwrite_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_default_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs index 8a5d41c8d813..866f7fe6e5f7 100644 --- a/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_default_features_with_no_default_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_features/mod.rs b/tests/testsuite/cargo_add/overwrite_features/mod.rs index da55fced20eb..65c5568a8fca 100644 --- a/tests/testsuite/cargo_add/overwrite_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs b/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs index fd63cc709684..e9df8598c710 100644 --- a/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_git_with_path/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs index 2b9550ce0a32..9a9b1d9d1b53 100644 --- a/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs index 2b9550ce0a32..9a9b1d9d1b53 100644 --- a/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inherit_noop/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs index 2b9550ce0a32..9a9b1d9d1b53 100644 --- a/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inherit_optional_noop/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs b/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs index 52ad6968a14d..5936a6ff7215 100644 --- a/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_inline_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -25,7 +25,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -37,8 +37,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs index ea37368d5d26..24b2fdad4d3f 100644 --- a/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_name_dev_noop/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -15,7 +15,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -25,8 +25,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs index 120be4429b78..e2d4061eb9d7 100644 --- a/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_name_noop/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -15,7 +15,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -25,8 +25,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs index 8a5d41c8d813..866f7fe6e5f7 100644 --- a/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_default_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs index 9d313b9d9faa..24f2bc9f15ee 100644 --- a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs index cc7e79b9761c..753710b7f2a6 100644 --- a/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_optional/mod.rs @@ -1,15 +1,15 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs index 8daaa961d795..490425d24e47 100644 --- a/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_optional_with_optional/mod.rs @@ -1,15 +1,15 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_no_public/mod.rs b/tests/testsuite/cargo_add/overwrite_no_public/mod.rs index 912ac3fd3a78..2563da1297c8 100644 --- a/tests/testsuite/cargo_add/overwrite_no_public/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_public/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .masquerade_as_nightly_cargo(&["public-dependency"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_no_public_with_public/mod.rs b/tests/testsuite/cargo_add/overwrite_no_public_with_public/mod.rs index bbf8d65a6e0c..b4925870294e 100644 --- a/tests/testsuite/cargo_add/overwrite_no_public_with_public/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_no_public_with_public/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .masquerade_as_nightly_cargo(&["public-dependency"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_optional/mod.rs index 8daaa961d795..490425d24e47 100644 --- a/tests/testsuite/cargo_add/overwrite_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_optional/mod.rs @@ -1,15 +1,15 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs index 511b31e29a05..c9ded04050d4 100644 --- a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -15,7 +15,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -25,8 +25,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_optional_with_optional/mod.rs b/tests/testsuite/cargo_add/overwrite_optional_with_optional/mod.rs index 434124e938a6..1eac27ed6b48 100644 --- a/tests/testsuite/cargo_add/overwrite_optional_with_optional/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_optional_with_optional/mod.rs @@ -1,15 +1,15 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package1", "99999.0.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs index fc057d8526be..5ffd0109814e 100644 --- a/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -15,7 +15,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -25,8 +25,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs b/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs index bb93cfa156b2..81004c6bb8b1 100644 --- a/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_path_with_version/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs index da55fced20eb..65c5568a8fca 100644 --- a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_public/mod.rs b/tests/testsuite/cargo_add/overwrite_public/mod.rs index bbf8d65a6e0c..b4925870294e 100644 --- a/tests/testsuite/cargo_add/overwrite_public/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_public/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .masquerade_as_nightly_cargo(&["public-dependency"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_public_with_no_public/mod.rs b/tests/testsuite/cargo_add/overwrite_public_with_no_public/mod.rs index 912ac3fd3a78..2563da1297c8 100644 --- a/tests/testsuite/cargo_add/overwrite_public_with_no_public/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_public_with_no_public/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .masquerade_as_nightly_cargo(&["public-dependency"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs b/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs index ea49a07c1d87..17cab971180e 100644 --- a/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_rename_with_no_rename/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("versioned-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs b/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs index af96caef566a..2e9d13cae4d3 100644 --- a/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_rename_with_rename/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("versioned-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs b/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs index 734d0b99ae82..c1ab290c29b7 100644 --- a/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_rename_with_rename_noop/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("versioned-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs b/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs index fcf0aa5e6a2d..4d254fd2c230 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_version_with_git/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("versioned-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let git_dep = cargo_test_support::git::new("versioned-package", |project| { @@ -38,8 +38,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs b/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs index fd63cc709684..e9df8598c710 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_version_with_path/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs b/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs index 49a0ae0ebbf1..e87ac7bac382 100644 --- a/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_with_rename/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("versioned-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs b/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs index 15cfa571c3ea..139b8537a02f 100644 --- a/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_workspace_dep/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs index 15cfa571c3ea..139b8537a02f 100644 --- a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs +++ b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +18,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/path/mod.rs b/tests/testsuite/cargo_add/path/mod.rs index fd63cc709684..e9df8598c710 100644 --- a/tests/testsuite/cargo_add/path/mod.rs +++ b/tests/testsuite/cargo_add/path/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/path_dev/mod.rs b/tests/testsuite/cargo_add/path_dev/mod.rs index 478e602a2725..859b78ec661c 100644 --- a/tests/testsuite/cargo_add/path_dev/mod.rs +++ b/tests/testsuite/cargo_add/path_dev/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/path_inferred_name/mod.rs b/tests/testsuite/cargo_add/path_inferred_name/mod.rs index fd63cc709684..e9df8598c710 100644 --- a/tests/testsuite/cargo_add/path_inferred_name/mod.rs +++ b/tests/testsuite/cargo_add/path_inferred_name/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs b/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs index 17c328ea60be..4b8b018ea1c7 100644 --- a/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs +++ b/tests/testsuite/cargo_add/path_inferred_name_conflicts_full_feature/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -18,8 +18,8 @@ fn case() { .current_dir(&cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/path_normalized_name/mod.rs b/tests/testsuite/cargo_add/path_normalized_name/mod.rs index 8ae8a4e7d22f..39488dc6922f 100644 --- a/tests/testsuite/cargo_add/path_normalized_name/mod.rs +++ b/tests/testsuite/cargo_add/path_normalized_name/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .failure() // Fuzzy searching for paths isn't supported at this time - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs b/tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs index 1998fa7420e2..4325c4d60b2a 100644 --- a/tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs +++ b/tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/preserve_features_table/mod.rs b/tests/testsuite/cargo_add/preserve_features_table/mod.rs index 1998fa7420e2..4325c4d60b2a 100644 --- a/tests/testsuite/cargo_add/preserve_features_table/mod.rs +++ b/tests/testsuite/cargo_add/preserve_features_table/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/preserve_sorted/mod.rs b/tests/testsuite/cargo_add/preserve_sorted/mod.rs index aef0d3d2fe31..b79b2fcbf1bf 100644 --- a/tests/testsuite/cargo_add/preserve_sorted/mod.rs +++ b/tests/testsuite/cargo_add/preserve_sorted/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/preserve_unsorted/mod.rs b/tests/testsuite/cargo_add/preserve_unsorted/mod.rs index aef0d3d2fe31..b79b2fcbf1bf 100644 --- a/tests/testsuite/cargo_add/preserve_unsorted/mod.rs +++ b/tests/testsuite/cargo_add/preserve_unsorted/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/public/mod.rs b/tests/testsuite/cargo_add/public/mod.rs index bbf8d65a6e0c..b4925870294e 100644 --- a/tests/testsuite/cargo_add/public/mod.rs +++ b/tests/testsuite/cargo_add/public/mod.rs @@ -1,14 +1,14 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("my-package", "0.1.0").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -19,8 +19,8 @@ fn case() { .masquerade_as_nightly_cargo(&["public-dependency"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/quiet/mod.rs b/tests/testsuite/cargo_add/quiet/mod.rs index 1a02b0802a16..949c70c13a76 100644 --- a/tests/testsuite/cargo_add/quiet/mod.rs +++ b/tests/testsuite/cargo_add/quiet/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/registry/mod.rs b/tests/testsuite/cargo_add/registry/mod.rs index d0d9378150a1..84a82fd408c7 100644 --- a/tests/testsuite/cargo_add/registry/mod.rs +++ b/tests/testsuite/cargo_add/registry/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -23,7 +23,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -33,8 +33,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/rename/mod.rs b/tests/testsuite/cargo_add/rename/mod.rs index 28c92d7702a3..a636c146a428 100644 --- a/tests/testsuite/cargo_add/rename/mod.rs +++ b/tests/testsuite/cargo_add/rename/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/require_weak/mod.rs b/tests/testsuite/cargo_add/require_weak/mod.rs index 1998fa7420e2..4325c4d60b2a 100644 --- a/tests/testsuite/cargo_add/require_weak/mod.rs +++ b/tests/testsuite/cargo_add/require_weak/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .feature("ears", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -24,8 +24,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/rust_version_ignore/mod.rs b/tests/testsuite/cargo_add/rust_version_ignore/mod.rs index 0404d12b4ba5..aaa063788979 100644 --- a/tests/testsuite/cargo_add/rust_version_ignore/mod.rs +++ b/tests/testsuite/cargo_add/rust_version_ignore/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .rust_version("1.72") .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -27,8 +27,8 @@ fn case() { .masquerade_as_nightly_cargo(&["msrv-policy"]) .assert() .code(0) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/rust_version_incompatible/mod.rs b/tests/testsuite/cargo_add/rust_version_incompatible/mod.rs index 31fb577862d1..e09763e43045 100644 --- a/tests/testsuite/cargo_add/rust_version_incompatible/mod.rs +++ b/tests/testsuite/cargo_add/rust_version_incompatible/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -17,7 +17,7 @@ fn case() { .rust_version("1.72") .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .masquerade_as_nightly_cargo(&["msrv-policy"]) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/rust_version_latest/mod.rs b/tests/testsuite/cargo_add/rust_version_latest/mod.rs index 7a42c566ebd0..839bbb3618be 100644 --- a/tests/testsuite/cargo_add/rust_version_latest/mod.rs +++ b/tests/testsuite/cargo_add/rust_version_latest/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .rust_version("1.72") .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -26,8 +26,8 @@ fn case() { .masquerade_as_nightly_cargo(&["msrv-policy"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/rust_version_older/mod.rs b/tests/testsuite/cargo_add/rust_version_older/mod.rs index 7a42c566ebd0..839bbb3618be 100644 --- a/tests/testsuite/cargo_add/rust_version_older/mod.rs +++ b/tests/testsuite/cargo_add/rust_version_older/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { .rust_version("1.72") .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -26,8 +26,8 @@ fn case() { .masquerade_as_nightly_cargo(&["msrv-policy"]) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs b/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs index 46e8708a1492..1b971c604f4a 100644 --- a/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs +++ b/tests/testsuite/cargo_add/sorted_table_with_dotted_item/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -26,7 +26,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -36,8 +36,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/target/mod.rs b/tests/testsuite/cargo_add/target/mod.rs index b47874949e73..b1dd145f655e 100644 --- a/tests/testsuite/cargo_add/target/mod.rs +++ b/tests/testsuite/cargo_add/target/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/target_cfg/mod.rs b/tests/testsuite/cargo_add/target_cfg/mod.rs index 0478ece76953..0f4c5aa340a6 100644 --- a/tests/testsuite/cargo_add/target_cfg/mod.rs +++ b/tests/testsuite/cargo_add/target_cfg/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -21,7 +21,7 @@ fn case() { } } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -31,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs b/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs index 8184dac8f0f0..3544a0794780 100644 --- a/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs +++ b/tests/testsuite/cargo_add/unknown_inherited_feature/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -16,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/vers/mod.rs b/tests/testsuite/cargo_add/vers/mod.rs index ee7dab2d1e50..72d111b8cdd2 100644 --- a/tests/testsuite/cargo_add/vers/mod.rs +++ b/tests/testsuite/cargo_add/vers/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +19,7 @@ fn case() { cargo_test_support::registry::Package::new("my-package", ver).publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/workspace_name/mod.rs b/tests/testsuite/cargo_add/workspace_name/mod.rs index 2ab0807debfa..8d15b28c895c 100644 --- a/tests/testsuite/cargo_add/workspace_name/mod.rs +++ b/tests/testsuite/cargo_add/workspace_name/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/workspace_path/mod.rs b/tests/testsuite/cargo_add/workspace_path/mod.rs index fd63cc709684..e9df8598c710 100644 --- a/tests/testsuite/cargo_add/workspace_path/mod.rs +++ b/tests/testsuite/cargo_add/workspace_path/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_add/workspace_path_dev/mod.rs b/tests/testsuite/cargo_add/workspace_path_dev/mod.rs index 478e602a2725..859b78ec661c 100644 --- a/tests/testsuite/cargo_add/workspace_path_dev/mod.rs +++ b/tests/testsuite/cargo_add/workspace_path_dev/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +20,7 @@ fn case() { .publish(); } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = project_root.join("primary"); @@ -30,8 +30,8 @@ fn case() { .current_dir(&cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_bench/help/mod.rs b/tests/testsuite/cargo_bench/help/mod.rs index 9338664e5cb1..cb20dace2b41 100644 --- a/tests/testsuite/cargo_bench/help/mod.rs +++ b/tests/testsuite/cargo_bench/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_bench/no_keep_going/mod.rs b/tests/testsuite/cargo_bench/no_keep_going/mod.rs index 6ed5f81f9768..0c02cd05e9d7 100644 --- a/tests/testsuite/cargo_bench/no_keep_going/mod.rs +++ b/tests/testsuite/cargo_bench/no_keep_going/mod.rs @@ -1,10 +1,11 @@ -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -14,6 +15,6 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_build/help/mod.rs b/tests/testsuite/cargo_build/help/mod.rs index 9ca23b478b5e..6761964e83d2 100644 --- a/tests/testsuite/cargo_build/help/mod.rs +++ b/tests/testsuite/cargo_build/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_check/help/mod.rs b/tests/testsuite/cargo_check/help/mod.rs index 71571bc95868..1273e95f8135 100644 --- a/tests/testsuite/cargo_check/help/mod.rs +++ b/tests/testsuite/cargo_check/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_clean/help/mod.rs b/tests/testsuite/cargo_clean/help/mod.rs index 7225292b80f8..1e518d32a460 100644 --- a/tests/testsuite/cargo_clean/help/mod.rs +++ b/tests/testsuite/cargo_clean/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_config/help/mod.rs b/tests/testsuite/cargo_config/help/mod.rs index 070238ef009c..142a4e799fcf 100644 --- a/tests/testsuite/cargo_config/help/mod.rs +++ b/tests/testsuite/cargo_config/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_doc/help/mod.rs b/tests/testsuite/cargo_doc/help/mod.rs index b0fd4f3e8f2e..df63e44369a8 100644 --- a/tests/testsuite/cargo_doc/help/mod.rs +++ b/tests/testsuite/cargo_doc/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_fetch/help/mod.rs b/tests/testsuite/cargo_fetch/help/mod.rs index 79025bc32c11..930a9fdd30a4 100644 --- a/tests/testsuite/cargo_fetch/help/mod.rs +++ b/tests/testsuite/cargo_fetch/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_fix/help/mod.rs b/tests/testsuite/cargo_fix/help/mod.rs index 2c67e1556027..90be0e17f6c3 100644 --- a/tests/testsuite/cargo_fix/help/mod.rs +++ b/tests/testsuite/cargo_fix/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_generate_lockfile/help/mod.rs b/tests/testsuite/cargo_generate_lockfile/help/mod.rs index 0408ce06b7a3..d7db955548a2 100644 --- a/tests/testsuite/cargo_generate_lockfile/help/mod.rs +++ b/tests/testsuite/cargo_generate_lockfile/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_git_checkout/help/mod.rs b/tests/testsuite/cargo_git_checkout/help/mod.rs index 5ff877fbb240..7beb14527d6c 100644 --- a/tests/testsuite/cargo_git_checkout/help/mod.rs +++ b/tests/testsuite/cargo_git_checkout/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_help/help/mod.rs b/tests/testsuite/cargo_help/help/mod.rs index af445cda1396..459e84bd1f37 100644 --- a/tests/testsuite/cargo_help/help/mod.rs +++ b/tests/testsuite/cargo_help/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_init/auto_git/mod.rs b/tests/testsuite/cargo_init/auto_git/mod.rs index 68c217520659..6d90b9d09594 100644 --- a/tests/testsuite/cargo_init/auto_git/mod.rs +++ b/tests/testsuite/cargo_init/auto_git/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); assert!(project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/bin_already_exists_explicit/mod.rs b/tests/testsuite/cargo_init/bin_already_exists_explicit/mod.rs index 326bd218a6a0..9f35c09f4e7b 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_explicit/mod.rs +++ b/tests/testsuite/cargo_init/bin_already_exists_explicit/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/mod.rs b/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/mod.rs index 1f16fb659aad..dfe65fcebd24 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/mod.rs +++ b/tests/testsuite/cargo_init/bin_already_exists_explicit_nosrc/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("src").is_dir()); } diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit/mod.rs b/tests/testsuite/cargo_init/bin_already_exists_implicit/mod.rs index 12349a09bdd9..40e62cc0dbd3 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit/mod.rs +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/mod.rs b/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/mod.rs index fe65940dbdc5..f8800d3f8223 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/mod.rs +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit_namenosrc/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("src").is_dir()); } diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/mod.rs b/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/mod.rs index d3e8e66df7ca..3586404da736 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/mod.rs +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit_namesrc/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("src/main.rs").is_file()); } diff --git a/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/mod.rs b/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/mod.rs index fe65940dbdc5..f8800d3f8223 100644 --- a/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/mod.rs +++ b/tests/testsuite/cargo_init/bin_already_exists_implicit_nosrc/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("src").is_dir()); } diff --git a/tests/testsuite/cargo_init/both_lib_and_bin/mod.rs b/tests/testsuite/cargo_init/both_lib_and_bin/mod.rs index c9232320a172..1423b300ce68 100644 --- a/tests/testsuite/cargo_init/both_lib_and_bin/mod.rs +++ b/tests/testsuite/cargo_init/both_lib_and_bin/mod.rs @@ -1,7 +1,6 @@ use cargo_test_support::paths; use cargo_test_support::prelude::*; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -12,8 +11,8 @@ fn case() { .current_dir(&cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); assert!(!cwd.join("Cargo.toml").is_file()); } diff --git a/tests/testsuite/cargo_init/cant_create_library_when_both_binlib_present/mod.rs b/tests/testsuite/cargo_init/cant_create_library_when_both_binlib_present/mod.rs index 5e9e1b94c488..b32ebe030729 100644 --- a/tests/testsuite/cargo_init/cant_create_library_when_both_binlib_present/mod.rs +++ b/tests/testsuite/cargo_init/cant_create_library_when_both_binlib_present/mod.rs @@ -1,11 +1,11 @@ use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -13,6 +13,6 @@ fn case() { .current_dir(project_root) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_init/confused_by_multiple_lib_files/mod.rs b/tests/testsuite/cargo_init/confused_by_multiple_lib_files/mod.rs index d1cba2ff71f1..8cc04bfe56e1 100644 --- a/tests/testsuite/cargo_init/confused_by_multiple_lib_files/mod.rs +++ b/tests/testsuite/cargo_init/confused_by_multiple_lib_files/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("Cargo.toml").is_file()); } diff --git a/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/mod.rs b/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/mod.rs index 326bd218a6a0..9f35c09f4e7b 100644 --- a/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/mod.rs +++ b/tests/testsuite/cargo_init/creates_binary_when_both_binlib_present/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/mod.rs b/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/mod.rs index 326bd218a6a0..9f35c09f4e7b 100644 --- a/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/mod.rs +++ b/tests/testsuite/cargo_init/creates_binary_when_instructed_and_has_lib_file/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/mod.rs b/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/mod.rs index 59c192cb9ec0..a5c4c000b2fb 100644 --- a/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/mod.rs +++ b/tests/testsuite/cargo_init/creates_library_when_instructed_and_has_bin_file/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/explicit_bin_with_git/mod.rs b/tests/testsuite/cargo_init/explicit_bin_with_git/mod.rs index 7314e955c037..e18cec9cf47d 100644 --- a/tests/testsuite/cargo_init/explicit_bin_with_git/mod.rs +++ b/tests/testsuite/cargo_init/explicit_bin_with_git/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/formats_source/mod.rs b/tests/testsuite/cargo_init/formats_source/mod.rs index ac1fb6271546..071da4aeee74 100644 --- a/tests/testsuite/cargo_init/formats_source/mod.rs +++ b/tests/testsuite/cargo_init/formats_source/mod.rs @@ -1,8 +1,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::{process, Project}; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -14,7 +14,7 @@ fn case() { eprintln!("skipping test, rustfmt not available:\n{e:?}"); return; } - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -22,8 +22,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/fossil_autodetect/mod.rs b/tests/testsuite/cargo_init/fossil_autodetect/mod.rs index d45ba868ad5c..627f1f6b3c0d 100644 --- a/tests/testsuite/cargo_init/fossil_autodetect/mod.rs +++ b/tests/testsuite/cargo_init/fossil_autodetect/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/git_autodetect/mod.rs b/tests/testsuite/cargo_init/git_autodetect/mod.rs index aef47bc7db8f..30730e660fc2 100644 --- a/tests/testsuite/cargo_init/git_autodetect/mod.rs +++ b/tests/testsuite/cargo_init/git_autodetect/mod.rs @@ -2,8 +2,8 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::paths; use cargo_test_support::prelude::*; use std::fs; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -16,9 +16,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/mod.rs b/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/mod.rs index cd4437c6537f..c0144481becf 100644 --- a/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/mod.rs +++ b/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/help/mod.rs b/tests/testsuite/cargo_init/help/mod.rs index 7f00d347a62a..7634a37c329c 100644 --- a/tests/testsuite/cargo_init/help/mod.rs +++ b/tests/testsuite/cargo_init/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_init/ignores_failure_to_format_source/mod.rs b/tests/testsuite/cargo_init/ignores_failure_to_format_source/mod.rs index fd9394049fcc..bd82d522c939 100644 --- a/tests/testsuite/cargo_init/ignores_failure_to_format_source/mod.rs +++ b/tests/testsuite/cargo_init/ignores_failure_to_format_source/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -15,8 +15,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/inferred_bin_with_git/mod.rs b/tests/testsuite/cargo_init/inferred_bin_with_git/mod.rs index 80bec8893cc3..5ab38a4b9386 100644 --- a/tests/testsuite/cargo_init/inferred_bin_with_git/mod.rs +++ b/tests/testsuite/cargo_init/inferred_bin_with_git/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/inferred_lib_with_git/mod.rs b/tests/testsuite/cargo_init/inferred_lib_with_git/mod.rs index 80bec8893cc3..5ab38a4b9386 100644 --- a/tests/testsuite/cargo_init/inferred_lib_with_git/mod.rs +++ b/tests/testsuite/cargo_init/inferred_lib_with_git/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/inherit_workspace_package_table/mod.rs b/tests/testsuite/cargo_init/inherit_workspace_package_table/mod.rs index 4e1dda845cb7..a3277f158e45 100644 --- a/tests/testsuite/cargo_init/inherit_workspace_package_table/mod.rs +++ b/tests/testsuite/cargo_init/inherit_workspace_package_table/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_init/invalid_dir_name/mod.rs b/tests/testsuite/cargo_init/invalid_dir_name/mod.rs index 2b1be9022b05..181d711cd948 100644 --- a/tests/testsuite/cargo_init/invalid_dir_name/mod.rs +++ b/tests/testsuite/cargo_init/invalid_dir_name/mod.rs @@ -1,8 +1,7 @@ use cargo_test_support::paths; use cargo_test_support::prelude::*; use std::fs; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -14,8 +13,8 @@ fn case() { .current_dir(foo) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); assert!(!foo.join("Cargo.toml").is_file()); } diff --git a/tests/testsuite/cargo_init/lib_already_exists_nosrc/mod.rs b/tests/testsuite/cargo_init/lib_already_exists_nosrc/mod.rs index d3e8e66df7ca..3586404da736 100644 --- a/tests/testsuite/cargo_init/lib_already_exists_nosrc/mod.rs +++ b/tests/testsuite/cargo_init/lib_already_exists_nosrc/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("src/main.rs").is_file()); } diff --git a/tests/testsuite/cargo_init/lib_already_exists_src/mod.rs b/tests/testsuite/cargo_init/lib_already_exists_src/mod.rs index d3e8e66df7ca..3586404da736 100644 --- a/tests/testsuite/cargo_init/lib_already_exists_src/mod.rs +++ b/tests/testsuite/cargo_init/lib_already_exists_src/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("src/main.rs").is_file()); } diff --git a/tests/testsuite/cargo_init/mercurial_autodetect/mod.rs b/tests/testsuite/cargo_init/mercurial_autodetect/mod.rs index d45ba868ad5c..627f1f6b3c0d 100644 --- a/tests/testsuite/cargo_init/mercurial_autodetect/mod.rs +++ b/tests/testsuite/cargo_init/mercurial_autodetect/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/multibin_project_name_clash/mod.rs b/tests/testsuite/cargo_init/multibin_project_name_clash/mod.rs index fdd4476d93bb..932d7ebf6e77 100644 --- a/tests/testsuite/cargo_init/multibin_project_name_clash/mod.rs +++ b/tests/testsuite/cargo_init/multibin_project_name_clash/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join("Cargo.toml").is_file()); } diff --git a/tests/testsuite/cargo_init/no_filename/mod.rs b/tests/testsuite/cargo_init/no_filename/mod.rs index 8edfd2823162..62817b9b9a54 100644 --- a/tests/testsuite/cargo_init/no_filename/mod.rs +++ b/tests/testsuite/cargo_init/no_filename/mod.rs @@ -1,7 +1,6 @@ use cargo_test_support::paths; use cargo_test_support::prelude::*; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; #[cfg(not(windows))] #[cargo_test] @@ -11,6 +10,6 @@ fn case() { .current_dir(paths::root()) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_init/path_contains_separator/mod.rs b/tests/testsuite/cargo_init/path_contains_separator/mod.rs index 0a12f4269d28..dafc62019af4 100644 --- a/tests/testsuite/cargo_init/path_contains_separator/mod.rs +++ b/tests/testsuite/cargo_init/path_contains_separator/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::{t, Project}; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root().join("test:ing"); if !project_root.exists() { @@ -18,9 +18,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".gitignore").is_file()); } diff --git a/tests/testsuite/cargo_init/pijul_autodetect/mod.rs b/tests/testsuite/cargo_init/pijul_autodetect/mod.rs index d45ba868ad5c..627f1f6b3c0d 100644 --- a/tests/testsuite/cargo_init/pijul_autodetect/mod.rs +++ b/tests/testsuite/cargo_init/pijul_autodetect/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/reserved_name/mod.rs b/tests/testsuite/cargo_init/reserved_name/mod.rs index cc65fd0a1835..5510a2ee6088 100644 --- a/tests/testsuite/cargo_init/reserved_name/mod.rs +++ b/tests/testsuite/cargo_init/reserved_name/mod.rs @@ -1,8 +1,7 @@ use cargo_test_support::paths; use cargo_test_support::prelude::*; use std::fs; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -14,8 +13,8 @@ fn case() { .current_dir(project_root) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); assert!(!project_root.join("Cargo.toml").is_file()); } diff --git a/tests/testsuite/cargo_init/simple_bin/mod.rs b/tests/testsuite/cargo_init/simple_bin/mod.rs index eaf0955f9f8c..f1539ae0057f 100644 --- a/tests/testsuite/cargo_init/simple_bin/mod.rs +++ b/tests/testsuite/cargo_init/simple_bin/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,10 +14,10 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".gitignore").is_file()); snapbox::cmd::Command::cargo_ui() diff --git a/tests/testsuite/cargo_init/simple_git/mod.rs b/tests/testsuite/cargo_init/simple_git/mod.rs index c373fe2a2c64..a60462030d1f 100644 --- a/tests/testsuite/cargo_init/simple_git/mod.rs +++ b/tests/testsuite/cargo_init/simple_git/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/simple_git_ignore_exists/mod.rs b/tests/testsuite/cargo_init/simple_git_ignore_exists/mod.rs index 142e86efdc06..d199be7ced41 100644 --- a/tests/testsuite/cargo_init/simple_git_ignore_exists/mod.rs +++ b/tests/testsuite/cargo_init/simple_git_ignore_exists/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,10 +14,10 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(project_root.join(".git").is_dir()); snapbox::cmd::Command::cargo_ui() diff --git a/tests/testsuite/cargo_init/simple_hg/mod.rs b/tests/testsuite/cargo_init/simple_hg/mod.rs index 1d6765453044..b55d50db0ca1 100644 --- a/tests/testsuite/cargo_init/simple_hg/mod.rs +++ b/tests/testsuite/cargo_init/simple_hg/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test(requires_hg)] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/simple_hg_ignore_exists/mod.rs b/tests/testsuite/cargo_init/simple_hg_ignore_exists/mod.rs index d45ba868ad5c..627f1f6b3c0d 100644 --- a/tests/testsuite/cargo_init/simple_hg_ignore_exists/mod.rs +++ b/tests/testsuite/cargo_init/simple_hg_ignore_exists/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,9 +14,9 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".git").is_dir()); } diff --git a/tests/testsuite/cargo_init/simple_lib/mod.rs b/tests/testsuite/cargo_init/simple_lib/mod.rs index d6bae51672a4..81594aaf79c0 100644 --- a/tests/testsuite/cargo_init/simple_lib/mod.rs +++ b/tests/testsuite/cargo_init/simple_lib/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,10 +14,10 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); assert!(!project_root.join(".gitignore").is_file()); snapbox::cmd::Command::cargo_ui() diff --git a/tests/testsuite/cargo_init/unknown_flags/mod.rs b/tests/testsuite/cargo_init/unknown_flags/mod.rs index 4289b4b9ec91..b7a5c7158fce 100644 --- a/tests/testsuite/cargo_init/unknown_flags/mod.rs +++ b/tests/testsuite/cargo_init/unknown_flags/mod.rs @@ -1,7 +1,6 @@ use cargo_test_support::paths; use cargo_test_support::prelude::*; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -10,6 +9,6 @@ fn case() { .current_dir(paths::root()) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_init/with_argument/mod.rs b/tests/testsuite/cargo_init/with_argument/mod.rs index 0b5e342a138f..38dc99d676ec 100644 --- a/tests/testsuite/cargo_init/with_argument/mod.rs +++ b/tests/testsuite/cargo_init/with_argument/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), project_root); + assert_ui().subset_matches(current_dir!().join("out"), project_root); } diff --git a/tests/testsuite/cargo_init/workspace_add_member/mod.rs b/tests/testsuite/cargo_init/workspace_add_member/mod.rs index 87e2af0e50f6..eb355cb023e9 100644 --- a/tests/testsuite/cargo_init/workspace_add_member/mod.rs +++ b/tests/testsuite/cargo_init/workspace_add_member/mod.rs @@ -1,12 +1,12 @@ use cargo_test_support::compare::assert_ui; use cargo_test_support::prelude::*; use cargo_test_support::Project; - -use cargo_test_support::curr_dir; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = &project.root(); snapbox::cmd::Command::cargo_ui() @@ -14,8 +14,8 @@ fn case() { .current_dir(project_root.join("crates").join("foo")) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_install/help/mod.rs b/tests/testsuite/cargo_install/help/mod.rs index a2c1c724b596..b38d58da319e 100644 --- a/tests/testsuite/cargo_install/help/mod.rs +++ b/tests/testsuite/cargo_install/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_locate_project/help/mod.rs b/tests/testsuite/cargo_locate_project/help/mod.rs index f6b7e8eafd2d..9bf212fdc716 100644 --- a/tests/testsuite/cargo_locate_project/help/mod.rs +++ b/tests/testsuite/cargo_locate_project/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_login/help/mod.rs b/tests/testsuite/cargo_login/help/mod.rs index 86b95da155cf..2704d3ed674b 100644 --- a/tests/testsuite/cargo_login/help/mod.rs +++ b/tests/testsuite/cargo_login/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_logout/help/mod.rs b/tests/testsuite/cargo_logout/help/mod.rs index f895b60dd3f1..bb38673b11ee 100644 --- a/tests/testsuite/cargo_logout/help/mod.rs +++ b/tests/testsuite/cargo_logout/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_metadata/help/mod.rs b/tests/testsuite/cargo_metadata/help/mod.rs index a88c374fedba..e2a77282e16c 100644 --- a/tests/testsuite/cargo_metadata/help/mod.rs +++ b/tests/testsuite/cargo_metadata/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_new/add_members_to_non_workspace/mod.rs b/tests/testsuite/cargo_new/add_members_to_non_workspace/mod.rs index c70b97ca7232..c6e27a71d579 100644 --- a/tests/testsuite/cargo_new/add_members_to_non_workspace/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_non_workspace/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/mod.rs b/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_format_previous_items/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/mod.rs b/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_format_sorted/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/mod.rs b/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/mod.rs index 8bf91be454ce..1408abc22703 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_absolute_package_path/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; let package_path = cwd.join("crates").join("foo"); @@ -16,8 +17,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/mod.rs b/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_empty_members/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/mod.rs b/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/mod.rs b/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_members_glob/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_without_members/mod.rs b/tests/testsuite/cargo_new/add_members_to_workspace_without_members/mod.rs index c70b97ca7232..c6e27a71d579 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_without_members/mod.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_without_members/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/empty_name/mod.rs b/tests/testsuite/cargo_new/empty_name/mod.rs index a7d56630fb57..2dfc2692bdf9 100644 --- a/tests/testsuite/cargo_new/empty_name/mod.rs +++ b/tests/testsuite/cargo_new/empty_name/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .failure() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/help/mod.rs b/tests/testsuite/cargo_new/help/mod.rs index 6a1721deb79d..94edbd017f59 100644 --- a/tests/testsuite/cargo_new/help/mod.rs +++ b/tests/testsuite/cargo_new/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_new/inherit_workspace_lints/mod.rs b/tests/testsuite/cargo_new/inherit_workspace_lints/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_lints/mod.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_lints/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table/mod.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table/mod.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/mod.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/mod.rs index c3ac2d375275..3ddd491a3b11 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/mod.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/mod.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/mod.rs index 16ec66ea216f..25122ace03ba 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/mod.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/mod.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/mod.rs index 9b9642468464..c0e34374d008 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/mod.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/mod.rs b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/mod.rs index 1634ece12fbf..3903a62f8d3b 100644 --- a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/mod.rs +++ b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/mod.rs @@ -1,11 +1,12 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -15,8 +16,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_owner/help/mod.rs b/tests/testsuite/cargo_owner/help/mod.rs index 20583e5b1bca..58a1accbd7a8 100644 --- a/tests/testsuite/cargo_owner/help/mod.rs +++ b/tests/testsuite/cargo_owner/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_package/help/mod.rs b/tests/testsuite/cargo_package/help/mod.rs index 4e2f28e4fc79..6e93472f87dc 100644 --- a/tests/testsuite/cargo_package/help/mod.rs +++ b/tests/testsuite/cargo_package/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_pkgid/help/mod.rs b/tests/testsuite/cargo_pkgid/help/mod.rs index 6d182d116579..c31e00919ada 100644 --- a/tests/testsuite/cargo_pkgid/help/mod.rs +++ b/tests/testsuite/cargo_pkgid/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_publish/help/mod.rs b/tests/testsuite/cargo_publish/help/mod.rs index 183b6aac4934..17b3da32a070 100644 --- a/tests/testsuite/cargo_publish/help/mod.rs +++ b/tests/testsuite/cargo_publish/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_read_manifest/help/mod.rs b/tests/testsuite/cargo_read_manifest/help/mod.rs index d0055f6d8d20..5d21732e9750 100644 --- a/tests/testsuite/cargo_read_manifest/help/mod.rs +++ b/tests/testsuite/cargo_read_manifest/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_remove/avoid_empty_tables/mod.rs b/tests/testsuite/cargo_remove/avoid_empty_tables/mod.rs index 17bc3f949e1b..2a8012a7260d 100644 --- a/tests/testsuite/cargo_remove/avoid_empty_tables/mod.rs +++ b/tests/testsuite/cargo_remove/avoid_empty_tables/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/build/mod.rs b/tests/testsuite/cargo_remove/build/mod.rs index 72ce478b9041..5ef1588a58a6 100644 --- a/tests/testsuite/cargo_remove/build/mod.rs +++ b/tests/testsuite/cargo_remove/build/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/dev/mod.rs b/tests/testsuite/cargo_remove/dev/mod.rs index d9cbdf1a7e04..837df4d0bb11 100644 --- a/tests/testsuite/cargo_remove/dev/mod.rs +++ b/tests/testsuite/cargo_remove/dev/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/dry_run/mod.rs b/tests/testsuite/cargo_remove/dry_run/mod.rs index 2e097135defe..8ac4bb2a452e 100644 --- a/tests/testsuite/cargo_remove/dry_run/mod.rs +++ b/tests/testsuite/cargo_remove/dry_run/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/gc_keep_used_patch/mod.rs b/tests/testsuite/cargo_remove/gc_keep_used_patch/mod.rs index f66478c5d0e5..938ab4f525e2 100644 --- a/tests/testsuite/cargo_remove/gc_keep_used_patch/mod.rs +++ b/tests/testsuite/cargo_remove/gc_keep_used_patch/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -11,7 +12,7 @@ fn case() { .dep("serde", "1.0.0") .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); snapbox::cmd::Command::cargo_ui() @@ -20,8 +21,8 @@ fn case() { .args(["--package", "serde", "serde_derive"]) .assert() .code(0) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/gc_patch/mod.rs b/tests/testsuite/cargo_remove/gc_patch/mod.rs index d4d305323bc6..69e16aa90b26 100644 --- a/tests/testsuite/cargo_remove/gc_patch/mod.rs +++ b/tests/testsuite/cargo_remove/gc_patch/mod.rs @@ -1,9 +1,10 @@ use cargo_test_support::basic_manifest; use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::git; use cargo_test_support::project; use cargo_test_support::CargoCommand; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -70,8 +71,8 @@ fn case() { .current_dir(&in_project.root()) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &in_project.root()); + assert_ui().subset_matches(current_dir!().join("out"), &in_project.root()); } diff --git a/tests/testsuite/cargo_remove/gc_profile/mod.rs b/tests/testsuite/cargo_remove/gc_profile/mod.rs index 98b99bec34c6..7d0c8846273d 100644 --- a/tests/testsuite/cargo_remove/gc_profile/mod.rs +++ b/tests/testsuite/cargo_remove/gc_profile/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +20,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +30,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/gc_replace/mod.rs b/tests/testsuite/cargo_remove/gc_replace/mod.rs index cbcf5bc07a31..4ba36d6768a4 100644 --- a/tests/testsuite/cargo_remove/gc_replace/mod.rs +++ b/tests/testsuite/cargo_remove/gc_replace/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -19,7 +20,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -29,8 +30,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/help/mod.rs b/tests/testsuite/cargo_remove/help/mod.rs index 69fb60f038e3..7e324daef434 100644 --- a/tests/testsuite/cargo_remove/help/mod.rs +++ b/tests/testsuite/cargo_remove/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_remove/invalid_arg/mod.rs b/tests/testsuite/cargo_remove/invalid_arg/mod.rs index 97d5c8625cd2..5630c5f8a058 100644 --- a/tests/testsuite/cargo_remove/invalid_arg/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_arg/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/invalid_dep/mod.rs b/tests/testsuite/cargo_remove/invalid_dep/mod.rs index fb32a075f142..7d33817f7900 100644 --- a/tests/testsuite/cargo_remove/invalid_dep/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_dep/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/invalid_package/mod.rs b/tests/testsuite/cargo_remove/invalid_package/mod.rs index d7f84c035eb9..f1738157a13e 100644 --- a/tests/testsuite/cargo_remove/invalid_package/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_package/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/invalid_package_multiple/mod.rs b/tests/testsuite/cargo_remove/invalid_package_multiple/mod.rs index d14179e0cc46..e5bb19b158d2 100644 --- a/tests/testsuite/cargo_remove/invalid_package_multiple/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_package_multiple/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/invalid_section/mod.rs b/tests/testsuite/cargo_remove/invalid_section/mod.rs index 94d4750590de..2e153a2c6ba5 100644 --- a/tests/testsuite/cargo_remove/invalid_section/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_section/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/invalid_section_dep/mod.rs b/tests/testsuite/cargo_remove/invalid_section_dep/mod.rs index c20cd94d2ff9..83f1713d9405 100644 --- a/tests/testsuite/cargo_remove/invalid_section_dep/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_section_dep/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/invalid_target/mod.rs b/tests/testsuite/cargo_remove/invalid_target/mod.rs index aba040a2b005..38612df31a3f 100644 --- a/tests/testsuite/cargo_remove/invalid_target/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_target/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/invalid_target_dep/mod.rs b/tests/testsuite/cargo_remove/invalid_target_dep/mod.rs index f187e609c339..fbd25da8f9c9 100644 --- a/tests/testsuite/cargo_remove/invalid_target_dep/mod.rs +++ b/tests/testsuite/cargo_remove/invalid_target_dep/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/multiple_deps/mod.rs b/tests/testsuite/cargo_remove/multiple_deps/mod.rs index d0af30a30162..0912e726e444 100644 --- a/tests/testsuite/cargo_remove/multiple_deps/mod.rs +++ b/tests/testsuite/cargo_remove/multiple_deps/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/multiple_dev/mod.rs b/tests/testsuite/cargo_remove/multiple_dev/mod.rs index 7ec2bd0b77b9..ff313a2c5ecc 100644 --- a/tests/testsuite/cargo_remove/multiple_dev/mod.rs +++ b/tests/testsuite/cargo_remove/multiple_dev/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/no_arg/mod.rs b/tests/testsuite/cargo_remove/no_arg/mod.rs index f9e0e554824f..9035c2e9e4d1 100644 --- a/tests/testsuite/cargo_remove/no_arg/mod.rs +++ b/tests/testsuite/cargo_remove/no_arg/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -27,8 +28,8 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/offline/mod.rs b/tests/testsuite/cargo_remove/offline/mod.rs index e227eb0956cc..cdf6f14204cf 100644 --- a/tests/testsuite/cargo_remove/offline/mod.rs +++ b/tests/testsuite/cargo_remove/offline/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -35,8 +36,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/optional_dep_feature/mod.rs b/tests/testsuite/cargo_remove/optional_dep_feature/mod.rs index ce8fcf71227d..0c9e2c25ebed 100644 --- a/tests/testsuite/cargo_remove/optional_dep_feature/mod.rs +++ b/tests/testsuite/cargo_remove/optional_dep_feature/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/optional_dep_feature_formatting/mod.rs b/tests/testsuite/cargo_remove/optional_dep_feature_formatting/mod.rs index 69406387b81b..b4c70d76a496 100644 --- a/tests/testsuite/cargo_remove/optional_dep_feature_formatting/mod.rs +++ b/tests/testsuite/cargo_remove/optional_dep_feature_formatting/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/optional_feature/mod.rs b/tests/testsuite/cargo_remove/optional_feature/mod.rs index 9ab3c4c24a19..b97c04f9465f 100644 --- a/tests/testsuite/cargo_remove/optional_feature/mod.rs +++ b/tests/testsuite/cargo_remove/optional_feature/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/package/mod.rs b/tests/testsuite/cargo_remove/package/mod.rs index 73d01b89dba8..5cb0d1f122f0 100644 --- a/tests/testsuite/cargo_remove/package/mod.rs +++ b/tests/testsuite/cargo_remove/package/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/remove_basic/mod.rs b/tests/testsuite/cargo_remove/remove_basic/mod.rs index 7c92026a5e63..7398c6bdc24e 100644 --- a/tests/testsuite/cargo_remove/remove_basic/mod.rs +++ b/tests/testsuite/cargo_remove/remove_basic/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/skip_gc_glob_profile/mod.rs b/tests/testsuite/cargo_remove/skip_gc_glob_profile/mod.rs index 2d587455c5a7..ad695363bf55 100644 --- a/tests/testsuite/cargo_remove/skip_gc_glob_profile/mod.rs +++ b/tests/testsuite/cargo_remove/skip_gc_glob_profile/mod.rs @@ -1,14 +1,15 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { cargo_test_support::registry::init(); cargo_test_support::registry::Package::new("toml", "0.1.1+my-package").publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -18,8 +19,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/target/mod.rs b/tests/testsuite/cargo_remove/target/mod.rs index 6f6fc5c61167..72873dfbb20d 100644 --- a/tests/testsuite/cargo_remove/target/mod.rs +++ b/tests/testsuite/cargo_remove/target/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/target_build/mod.rs b/tests/testsuite/cargo_remove/target_build/mod.rs index 7adffa229222..9eb2798b4d7a 100644 --- a/tests/testsuite/cargo_remove/target_build/mod.rs +++ b/tests/testsuite/cargo_remove/target_build/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/target_dev/mod.rs b/tests/testsuite/cargo_remove/target_dev/mod.rs index 005eb78716b6..b269a7db6729 100644 --- a/tests/testsuite/cargo_remove/target_dev/mod.rs +++ b/tests/testsuite/cargo_remove/target_dev/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -20,7 +21,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -30,8 +31,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/update_lock_file/mod.rs b/tests/testsuite/cargo_remove/update_lock_file/mod.rs index 00e7964e45c9..bfd1c479f65c 100644 --- a/tests/testsuite/cargo_remove/update_lock_file/mod.rs +++ b/tests/testsuite/cargo_remove/update_lock_file/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/workspace/mod.rs b/tests/testsuite/cargo_remove/workspace/mod.rs index 5274b07d7a1a..b45f8f012391 100644 --- a/tests/testsuite/cargo_remove/workspace/mod.rs +++ b/tests/testsuite/cargo_remove/workspace/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/workspace_non_virtual/mod.rs b/tests/testsuite/cargo_remove/workspace_non_virtual/mod.rs index 5274b07d7a1a..b45f8f012391 100644 --- a/tests/testsuite/cargo_remove/workspace_non_virtual/mod.rs +++ b/tests/testsuite/cargo_remove/workspace_non_virtual/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_remove/workspace_preserved/mod.rs b/tests/testsuite/cargo_remove/workspace_preserved/mod.rs index 5274b07d7a1a..b45f8f012391 100644 --- a/tests/testsuite/cargo_remove/workspace_preserved/mod.rs +++ b/tests/testsuite/cargo_remove/workspace_preserved/mod.rs @@ -1,7 +1,8 @@ use cargo_test_support::compare::assert_ui; -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { @@ -18,7 +19,7 @@ fn case() { .feature("std", &[]) .publish(); - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -28,8 +29,8 @@ fn case() { .current_dir(cwd) .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); - assert_ui().subset_matches(curr_dir!().join("out"), &project_root); + assert_ui().subset_matches(current_dir!().join("out"), &project_root); } diff --git a/tests/testsuite/cargo_report/help/mod.rs b/tests/testsuite/cargo_report/help/mod.rs index 3d29757694ba..02969bfe7786 100644 --- a/tests/testsuite/cargo_report/help/mod.rs +++ b/tests/testsuite/cargo_report/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_run/help/mod.rs b/tests/testsuite/cargo_run/help/mod.rs index 0a8a6bde076e..f6ac74ecc13f 100644 --- a/tests/testsuite/cargo_run/help/mod.rs +++ b/tests/testsuite/cargo_run/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_rustc/help/mod.rs b/tests/testsuite/cargo_rustc/help/mod.rs index 0a3b3168642f..654966b01b9d 100644 --- a/tests/testsuite/cargo_rustc/help/mod.rs +++ b/tests/testsuite/cargo_rustc/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_rustdoc/help/mod.rs b/tests/testsuite/cargo_rustdoc/help/mod.rs index 88652749f9cb..1321fc99930f 100644 --- a/tests/testsuite/cargo_rustdoc/help/mod.rs +++ b/tests/testsuite/cargo_rustdoc/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_search/help/mod.rs b/tests/testsuite/cargo_search/help/mod.rs index b580816e722d..45db4e69de6d 100644 --- a/tests/testsuite/cargo_search/help/mod.rs +++ b/tests/testsuite/cargo_search/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_test/help/mod.rs b/tests/testsuite/cargo_test/help/mod.rs index ae5b092b774f..23a754186dee 100644 --- a/tests/testsuite/cargo_test/help/mod.rs +++ b/tests/testsuite/cargo_test/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_test/no_keep_going/mod.rs b/tests/testsuite/cargo_test/no_keep_going/mod.rs index fdec61642359..0024abdf7400 100644 --- a/tests/testsuite/cargo_test/no_keep_going/mod.rs +++ b/tests/testsuite/cargo_test/no_keep_going/mod.rs @@ -1,10 +1,11 @@ -use cargo_test_support::curr_dir; use cargo_test_support::CargoCommand; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -14,6 +15,6 @@ fn case() { .current_dir(cwd) .assert() .code(1) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_tree/help/mod.rs b/tests/testsuite/cargo_tree/help/mod.rs index 269ac2cdc31b..9b9d96db4394 100644 --- a/tests/testsuite/cargo_tree/help/mod.rs +++ b/tests/testsuite/cargo_tree/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_uninstall/help/mod.rs b/tests/testsuite/cargo_uninstall/help/mod.rs index 60c4faed0c82..dbfdbe8a35b0 100644 --- a/tests/testsuite/cargo_uninstall/help/mod.rs +++ b/tests/testsuite/cargo_uninstall/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_update/help/mod.rs b/tests/testsuite/cargo_update/help/mod.rs index ae310977c451..282dcacaca23 100644 --- a/tests/testsuite/cargo_update/help/mod.rs +++ b/tests/testsuite/cargo_update/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_update/toolchain_pkgname/mod.rs b/tests/testsuite/cargo_update/toolchain_pkgname/mod.rs index f1488b90d160..3429da752e65 100644 --- a/tests/testsuite/cargo_update/toolchain_pkgname/mod.rs +++ b/tests/testsuite/cargo_update/toolchain_pkgname/mod.rs @@ -1,10 +1,11 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; use cargo_test_support::Project; +use cargo_test_support::file; +use cargo_test_support::::current_dir; #[cargo_test] fn case() { - let project = Project::from_template(curr_dir!().join("in")); + let project = Project::from_template(current_dir!().join("in")); let project_root = project.root(); let cwd = &project_root; @@ -14,6 +15,6 @@ fn case() { .current_dir(cwd) .assert() .code(101) - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_vendor/help/mod.rs b/tests/testsuite/cargo_vendor/help/mod.rs index c111b99c0f75..535c632e042c 100644 --- a/tests/testsuite/cargo_vendor/help/mod.rs +++ b/tests/testsuite/cargo_vendor/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_verify_project/help/mod.rs b/tests/testsuite/cargo_verify_project/help/mod.rs index 8f6c9bab1414..04da9b075070 100644 --- a/tests/testsuite/cargo_verify_project/help/mod.rs +++ b/tests/testsuite/cargo_verify_project/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_version/help/mod.rs b/tests/testsuite/cargo_version/help/mod.rs index daa8548c67da..b8af7afa94ff 100644 --- a/tests/testsuite/cargo_version/help/mod.rs +++ b/tests/testsuite/cargo_version/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); } diff --git a/tests/testsuite/cargo_yank/help/mod.rs b/tests/testsuite/cargo_yank/help/mod.rs index 12034f1524f6..379cb61894af 100644 --- a/tests/testsuite/cargo_yank/help/mod.rs +++ b/tests/testsuite/cargo_yank/help/mod.rs @@ -1,5 +1,5 @@ -use cargo_test_support::curr_dir; use cargo_test_support::prelude::*; +use cargo_test_support::file; #[cargo_test] fn case() { @@ -8,6 +8,6 @@ fn case() { .arg("--help") .assert() .success() - .stdout_matches_path(curr_dir!().join("stdout.log")) - .stderr_matches_path(curr_dir!().join("stderr.log")); + .stdout_matches(file!["stdout.log"]) + .stderr_matches(file!["stderr.log"]); }