summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/cargo_remove/dry_run
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/tests/testsuite/cargo_remove/dry_run')
l---------src/tools/cargo/tests/testsuite/cargo_remove/dry_run/in1
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/dry_run/mod.rs25
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/dry_run/out/Cargo.toml24
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/dry_run/out/src/lib.rs1
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stderr.log2
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stdout.log0
6 files changed, 53 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/in b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/in
new file mode 120000
index 000000000..7fd0ba5eb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/in
@@ -0,0 +1 @@
+../remove-basic.in/ \ No newline at end of file
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/mod.rs b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/mod.rs
new file mode 100644
index 000000000..dca189315
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/mod.rs
@@ -0,0 +1,25 @@
+use cargo_test_support::compare::assert_ui;
+use cargo_test_support::curr_dir;
+use cargo_test_support::CargoCommand;
+use cargo_test_support::Project;
+
+use crate::cargo_remove::init_registry;
+
+#[cargo_test]
+fn case() {
+ init_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("remove")
+ .args(["semver", "--dry-run"])
+ .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_remove/dry_run/out/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/out/Cargo.toml
new file mode 100644
index 000000000..340f06cda
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/out/Cargo.toml
@@ -0,0 +1,24 @@
+[package]
+name = "cargo-remove-test-fixture"
+version = "0.1.0"
+
+[[bin]]
+name = "main"
+path = "src/main.rs"
+
+[build-dependencies]
+semver = "0.1.0"
+
+[dependencies]
+docopt = "0.6"
+rustc-serialize = "0.4"
+semver = "0.1"
+toml = "0.1"
+clippy = "0.4"
+
+[dev-dependencies]
+regex = "0.1.1"
+serde = "1.0.90"
+
+[features]
+std = ["serde/std", "semver/std"]
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/out/src/lib.rs b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/out/src/lib.rs
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/out/src/lib.rs
@@ -0,0 +1 @@
+
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stderr.log b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stderr.log
new file mode 100644
index 000000000..8b118911c
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stderr.log
@@ -0,0 +1,2 @@
+ Removing semver from dependencies
+warning: aborting remove due to dry run
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stdout.log b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stdout.log
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/dry_run/stdout.log