Skip to content

Commit 1ba9cfb

Browse files
committed
Add skip gc glob profile test
1 parent fe6d00c commit 1ba9cfb

File tree

7 files changed

+51
-0
lines changed

7 files changed

+51
-0
lines changed

tests/testsuite/cargo_remove/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ mod optional_dep_feature;
2323
mod optional_feature;
2424
mod package;
2525
mod remove_basic;
26+
mod skip_gc_glob_profile;
2627
mod target;
2728
mod target_build;
2829
mod target_dev;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "cargo-remove-test-fixture"
3+
version = "0.1.0"
4+
5+
[[bin]]
6+
name = "main"
7+
path = "src/main.rs"
8+
9+
[dependencies]
10+
toml = "0.1"
11+
12+
[profile.dev.package."*"]
13+
opt-level = 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
use cargo_test_support::compare::assert_ui;
2+
use cargo_test_support::curr_dir;
3+
use cargo_test_support::CargoCommand;
4+
use cargo_test_support::Project;
5+
6+
#[cargo_test]
7+
fn case() {
8+
cargo_test_support::registry::init();
9+
cargo_test_support::registry::Package::new("toml", "0.1.1+my-package").publish();
10+
11+
let project = Project::from_template(curr_dir!().join("in"));
12+
let project_root = project.root();
13+
let cwd = &project_root;
14+
15+
snapbox::cmd::Command::cargo_ui()
16+
.arg("remove")
17+
.args(["toml"])
18+
.current_dir(cwd)
19+
.assert()
20+
.success()
21+
.stdout_matches_path(curr_dir!().join("stdout.log"))
22+
.stderr_matches_path(curr_dir!().join("stderr.log"));
23+
24+
assert_ui().subset_matches(curr_dir!().join("out"), &project_root);
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "cargo-remove-test-fixture"
3+
version = "0.1.0"
4+
5+
[[bin]]
6+
name = "main"
7+
path = "src/main.rs"
8+
9+
[profile.dev.package."*"]
10+
opt-level = 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removing toml from dependencies

tests/testsuite/cargo_remove/skip_gc_glob_profile/stdout.log

Whitespace-only changes.

0 commit comments

Comments
 (0)