diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:55 +0000 |
commit | 2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4 (patch) | |
tree | 033cc839730fda84ff08db877037977be94e5e3a /tests/testsuite/cargo_remove/optional_feature | |
parent | Initial commit. (diff) | |
download | cargo-2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4.tar.xz cargo-2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4.zip |
Adding upstream version 0.70.1+ds1.upstream/0.70.1+ds1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/testsuite/cargo_remove/optional_feature')
5 files changed, 51 insertions, 0 deletions
diff --git a/tests/testsuite/cargo_remove/optional_feature/in b/tests/testsuite/cargo_remove/optional_feature/in new file mode 120000 index 0000000..7fd0ba5 --- /dev/null +++ b/tests/testsuite/cargo_remove/optional_feature/in @@ -0,0 +1 @@ +../remove-basic.in/
\ No newline at end of file diff --git a/tests/testsuite/cargo_remove/optional_feature/mod.rs b/tests/testsuite/cargo_remove/optional_feature/mod.rs new file mode 100644 index 0000000..af54226 --- /dev/null +++ b/tests/testsuite/cargo_remove/optional_feature/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"]) + .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/tests/testsuite/cargo_remove/optional_feature/out/Cargo.toml b/tests/testsuite/cargo_remove/optional_feature/out/Cargo.toml new file mode 100644 index 0000000..9ac0b1b --- /dev/null +++ b/tests/testsuite/cargo_remove/optional_feature/out/Cargo.toml @@ -0,0 +1,23 @@ +[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" +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/tests/testsuite/cargo_remove/optional_feature/stderr.log b/tests/testsuite/cargo_remove/optional_feature/stderr.log new file mode 100644 index 0000000..2dc546f --- /dev/null +++ b/tests/testsuite/cargo_remove/optional_feature/stderr.log @@ -0,0 +1,2 @@ + Removing semver from dependencies + Updating `dummy-registry` index diff --git a/tests/testsuite/cargo_remove/optional_feature/stdout.log b/tests/testsuite/cargo_remove/optional_feature/stdout.log new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/testsuite/cargo_remove/optional_feature/stdout.log |