summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop')
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/Cargo.toml9
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/Cargo.toml9
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/src/lib.rs0
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/src/lib.rs0
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs25
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/out/Cargo.toml9
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/out/dependency/Cargo.toml9
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stderr.log4
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stdout.log0
9 files changed, 65 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/Cargo.toml
new file mode 100644
index 000000000..bbaf4f552
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/Cargo.toml
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/Cargo.toml
new file mode 100644
index 000000000..8243797eb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/Cargo.toml
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/src/lib.rs b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/src/lib.rs
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/dependency/src/lib.rs
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/src/lib.rs b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/src/lib.rs
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/in/src/lib.rs
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs
new file mode 100644
index 000000000..f04405a34
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/mod.rs
@@ -0,0 +1,25 @@
+use cargo_test_support::compare::assert_ui;
+use cargo_test_support::prelude::*;
+use cargo_test_support::Project;
+
+use crate::cargo_add::init_alt_registry;
+use cargo_test_support::curr_dir;
+
+#[cargo_test]
+fn case() {
+ init_alt_registry();
+ 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")
+ .arg_line("your-face --path ./dependency")
+ .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_path_noop/out/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/out/Cargo.toml
new file mode 100644
index 000000000..bbaf4f552
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/out/Cargo.toml
@@ -0,0 +1,9 @@
+[workspace]
+exclude = ["dependency"]
+
+[package]
+name = "cargo-list-test-fixture"
+version = "0.0.0"
+
+[dependencies]
+your-face = { version = "0.0.0", path = "dependency", optional = true, default-features = false, features = ["nose", "mouth"], registry = "alternative" }
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/out/dependency/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/out/dependency/Cargo.toml
new file mode 100644
index 000000000..8243797eb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/out/dependency/Cargo.toml
@@ -0,0 +1,9 @@
+[workspace]
+
+[package]
+name = "your-face"
+version = "0.0.0"
+
+[features]
+mouth = []
+nose = []
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stderr.log b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stderr.log
new file mode 100644
index 000000000..2f0b90de0
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stderr.log
@@ -0,0 +1,4 @@
+ Adding your-face (local) to optional dependencies.
+ Features:
+ + mouth
+ + nose
diff --git a/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stdout.log b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stdout.log
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_add/overwrite_path_noop/stdout.log