summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/cargo_remove/target_build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
commit10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch)
treebdffd5d80c26cf4a7a518281a204be1ace85b4c1 /src/tools/cargo/tests/testsuite/cargo_remove/target_build
parentReleasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff)
downloadrustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz
rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/cargo/tests/testsuite/cargo_remove/target_build')
l---------src/tools/cargo/tests/testsuite/cargo_remove/target_build/in1
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/target_build/mod.rs25
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/target_build/out/Cargo.toml30
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/target_build/stderr.log2
-rw-r--r--src/tools/cargo/tests/testsuite/cargo_remove/target_build/stdout.log0
5 files changed, 58 insertions, 0 deletions
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/target_build/in b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/in
new file mode 120000
index 000000000..d5742d038
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/in
@@ -0,0 +1 @@
+../remove-target.in/ \ No newline at end of file
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/target_build/mod.rs b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/mod.rs
new file mode 100644
index 000000000..11afbbf8f
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/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(["--build", "--target", "x86_64-unknown-linux-gnu", "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/src/tools/cargo/tests/testsuite/cargo_remove/target_build/out/Cargo.toml b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/out/Cargo.toml
new file mode 100644
index 000000000..7353c7a89
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/out/Cargo.toml
@@ -0,0 +1,30 @@
+[package]
+name = "cargo-remove-target-test-fixture"
+version = "0.1.0"
+
+[[bin]]
+name = "main"
+path = "src/main.rs"
+
+[target.x86_64-unknown-freebsd.build-dependencies]
+semver = "0.1.0"
+
+[dependencies]
+docopt = "0.6"
+rustc-serialize = "0.4"
+semver = "0.1"
+toml = "0.1"
+clippy = "0.4"
+
+[target.x86_64-unknown-linux-gnu.dependencies]
+dbus = "0.6.2"
+
+[dev-dependencies]
+regex = "0.1.1"
+serde = "1.0.90"
+
+[target.x86_64-unknown-linux-gnu.dev-dependencies]
+ncurses = "20.0"
+
+[features]
+std = ["serde/std", "semver/std"]
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/target_build/stderr.log b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/stderr.log
new file mode 100644
index 000000000..b06f8f319
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/stderr.log
@@ -0,0 +1,2 @@
+ Removing semver from build-dependencies for target `x86_64-unknown-linux-gnu`
+ Updating `dummy-registry` index
diff --git a/src/tools/cargo/tests/testsuite/cargo_remove/target_build/stdout.log b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/stdout.log
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/tools/cargo/tests/testsuite/cargo_remove/target_build/stdout.log