Skip to content

Commit f950c73

Browse files
committed
test(fix): Simplify existing-table test
We already have a test that covers each dep type; we don't need to cover that here.
1 parent 952ef5c commit f950c73

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

tests/testsuite/fix.rs

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2600,9 +2600,7 @@ target-dep = ["dep:target-dep"]
26002600

26012601
#[cargo_test]
26022602
fn add_feature_for_unused_dep_existing_table() {
2603-
Package::new("bar", "0.1.0").publish();
2604-
Package::new("baz", "0.1.0").publish();
2605-
Package::new("target-dep", "0.1.0").publish();
2603+
Package::new("dep", "0.1.0").publish();
26062604
let p = project()
26072605
.file(
26082606
"Cargo.toml",
@@ -2613,16 +2611,10 @@ version = "0.1.0"
26132611
edition = "2021"
26142612
26152613
[dependencies]
2616-
bar = { version = "0.1.0", optional = true }
2617-
2618-
[build-dependencies]
2619-
baz = { version = "0.1.0", optional = true }
2620-
2621-
[target.'cfg(target_os = "linux")'.dependencies]
2622-
target-dep = { version = "0.1.0", optional = true }
2614+
dep = { version = "0.1.0", optional = true }
26232615
26242616
[features]
2625-
target-dep = ["dep:target-dep"]
2617+
existing = []
26262618
"#,
26272619
)
26282620
.file("src/lib.rs", "")
@@ -2633,9 +2625,9 @@ target-dep = ["dep:target-dep"]
26332625
.with_stderr(
26342626
"\
26352627
[MIGRATING] Cargo.toml from 2021 edition to 2024
2636-
[FIXED] Cargo.toml (2 fixes)
2628+
[FIXED] Cargo.toml (1 fix)
26372629
[UPDATING] `dummy-registry` index
2638-
[LOCKING] 4 packages to latest compatible versions
2630+
[LOCKING] 2 packages to latest compatible versions
26392631
[CHECKING] foo v0.1.0 ([CWD])
26402632
[MIGRATING] src/lib.rs from 2021 edition to 2024
26412633
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
@@ -2652,18 +2644,11 @@ version = "0.1.0"
26522644
edition = "2021"
26532645
26542646
[dependencies]
2655-
bar = { version = "0.1.0", optional = true }
2656-
2657-
[build-dependencies]
2658-
baz = { version = "0.1.0", optional = true }
2659-
2660-
[target.'cfg(target_os = "linux")'.dependencies]
2661-
target-dep = { version = "0.1.0", optional = true }
2647+
dep = { version = "0.1.0", optional = true }
26622648
26632649
[features]
2664-
target-dep = ["dep:target-dep"]
2665-
bar = ["dep:bar"]
2666-
baz = ["dep:baz"]
2650+
existing = []
2651+
dep = ["dep:dep"]
26672652
26682653
"#]],
26692654
);

0 commit comments

Comments
 (0)