Skip to content

Commit fa14a13

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 1b51d17 commit fa14a13

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
@@ -2602,9 +2602,7 @@ target-dep = ["dep:target-dep"]
26022602

26032603
#[cargo_test]
26042604
fn add_feature_for_unused_dep_existing_table() {
2605-
Package::new("bar", "0.1.0").publish();
2606-
Package::new("baz", "0.1.0").publish();
2607-
Package::new("target-dep", "0.1.0").publish();
2605+
Package::new("dep", "0.1.0").publish();
26082606
let p = project()
26092607
.file(
26102608
"Cargo.toml",
@@ -2615,16 +2613,10 @@ version = "0.1.0"
26152613
edition = "2021"
26162614
26172615
[dependencies]
2618-
bar = { version = "0.1.0", optional = true }
2619-
2620-
[build-dependencies]
2621-
baz = { version = "0.1.0", optional = true }
2622-
2623-
[target.'cfg(target_os = "linux")'.dependencies]
2624-
target-dep = { version = "0.1.0", optional = true }
2616+
dep = { version = "0.1.0", optional = true }
26252617
26262618
[features]
2627-
target-dep = ["dep:target-dep"]
2619+
existing = []
26282620
"#,
26292621
)
26302622
.file("src/lib.rs", "")
@@ -2635,9 +2627,9 @@ target-dep = ["dep:target-dep"]
26352627
.with_stderr(
26362628
"\
26372629
[MIGRATING] Cargo.toml from 2021 edition to 2024
2638-
[FIXED] Cargo.toml (2 fixes)
2630+
[FIXED] Cargo.toml (1 fix)
26392631
[UPDATING] `dummy-registry` index
2640-
[LOCKING] 4 packages to latest compatible versions
2632+
[LOCKING] 2 packages to latest compatible versions
26412633
[CHECKING] foo v0.1.0 ([CWD])
26422634
[MIGRATING] src/lib.rs from 2021 edition to 2024
26432635
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
@@ -2654,18 +2646,11 @@ version = "0.1.0"
26542646
edition = "2021"
26552647
26562648
[dependencies]
2657-
bar = { version = "0.1.0", optional = true }
2658-
2659-
[build-dependencies]
2660-
baz = { version = "0.1.0", optional = true }
2661-
2662-
[target.'cfg(target_os = "linux")'.dependencies]
2663-
target-dep = { version = "0.1.0", optional = true }
2649+
dep = { version = "0.1.0", optional = true }
26642650
26652651
[features]
2666-
target-dep = ["dep:target-dep"]
2667-
bar = ["dep:bar"]
2668-
baz = ["dep:baz"]
2652+
existing = []
2653+
dep = ["dep:dep"]
26692654
26702655
"#]],
26712656
);

0 commit comments

Comments
 (0)