mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Add skip gc glob profile test
This commit is contained in:
parent
b746397dd4
commit
63ccc35642
@ -23,6 +23,7 @@ mod optional_dep_feature;
|
||||
mod optional_feature;
|
||||
mod package;
|
||||
mod remove_basic;
|
||||
mod skip_gc_glob_profile;
|
||||
mod target;
|
||||
mod target_build;
|
||||
mod target_dev;
|
||||
|
@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "cargo-remove-test-fixture"
|
||||
version = "0.1.0"
|
||||
|
||||
[[bin]]
|
||||
name = "main"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
toml = "0.1"
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
@ -0,0 +1 @@
|
||||
|
25
tests/testsuite/cargo_remove/skip_gc_glob_profile/mod.rs
Normal file
25
tests/testsuite/cargo_remove/skip_gc_glob_profile/mod.rs
Normal file
@ -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;
|
||||
|
||||
#[cargo_test]
|
||||
fn case() {
|
||||
cargo_test_support::registry::init();
|
||||
cargo_test_support::registry::Package::new("toml", "0.1.1+my-package").publish();
|
||||
|
||||
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(["toml"])
|
||||
.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);
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "cargo-remove-test-fixture"
|
||||
version = "0.1.0"
|
||||
|
||||
[[bin]]
|
||||
name = "main"
|
||||
path = "src/main.rs"
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
@ -0,0 +1 @@
|
||||
Removing toml from dependencies
|
Loading…
x
Reference in New Issue
Block a user