diff options
Diffstat (limited to 'src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop')
11 files changed, 60 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/Cargo.toml new file mode 100644 index 000000000..24c50556b --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/Cargo.toml @@ -0,0 +1,5 @@ +[workspace] +members = ["primary", "dependency"] + +[workspace.dependencies] +foo = { version = "0.0.0", path = "./dependency"}
\ No newline at end of file diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/dependency/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/dependency/Cargo.toml new file mode 100644 index 000000000..bed932047 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/dependency/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "foo" +version = "0.0.0" + +[features] +test = []
\ No newline at end of file diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/dependency/src/lib.rs b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/dependency/src/lib.rs new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/dependency/src/lib.rs diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/primary/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/primary/Cargo.toml new file mode 100644 index 000000000..a131c946d --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/primary/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "bar" +version = "0.0.0" + +[dependencies] +foo = { workspace = true, features = ["test"] }
\ No newline at end of file diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/primary/src/lib.rs b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/primary/src/lib.rs new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/in/primary/src/lib.rs diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs new file mode 100644 index 000000000..161783282 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/mod.rs @@ -0,0 +1,23 @@ +use cargo_test_support::compare::assert_ui; +use cargo_test_support::prelude::*; +use cargo_test_support::Project; + +use cargo_test_support::curr_dir; + +#[cargo_test] +fn case() { + let project = Project::from_template(curr_dir!().join("in")); + let project_root = project.root(); + let cwd = &project_root; + + snapbox::cmd::Command::cargo_ui() + .arg("add") + .args(["foo", "-p", "bar"]) + .current_dir(cwd) + .assert() + .success() + .stdout_matches_path(curr_dir!().join("stdout.log")) + .stderr_matches_path(curr_dir!().join("stderr.log")); + + assert_ui().subset_matches(curr_dir!().join("out"), &project_root); +} diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/Cargo.toml new file mode 100644 index 000000000..24c50556b --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/Cargo.toml @@ -0,0 +1,5 @@ +[workspace] +members = ["primary", "dependency"] + +[workspace.dependencies] +foo = { version = "0.0.0", path = "./dependency"}
\ No newline at end of file diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/dependency/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/dependency/Cargo.toml new file mode 100644 index 000000000..bed932047 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/dependency/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "foo" +version = "0.0.0" + +[features] +test = []
\ No newline at end of file diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/primary/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/primary/Cargo.toml new file mode 100644 index 000000000..fb4a12619 --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/out/primary/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "bar" +version = "0.0.0" + +[dependencies] +foo = { workspace = true, features = ["test"] } diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/stderr.log b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/stderr.log new file mode 100644 index 000000000..3c7133bbc --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/stderr.log @@ -0,0 +1,3 @@ + Adding foo (workspace) to dependencies. + Features as of v0.0.0: + + test diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/stdout.log b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/stdout.log new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_inherit_features_noop/stdout.log |