Skip to content

Commit a846226

Browse files
committed
Remove unrelated cases
Signed-off-by: hi-rustin <[email protected]>
1 parent 8d2103f commit a846226

File tree

1 file changed

+12
-64
lines changed

1 file changed

+12
-64
lines changed

tests/testsuite/patch.rs

Lines changed: 12 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -795,37 +795,6 @@ fn add_patch_with_features() {
795795
.file(
796796
"Cargo.toml",
797797
r#"
798-
[package]
799-
name = "foo"
800-
version = "0.0.1"
801-
authors = []
802-
803-
[dependencies]
804-
bar = "0.1.0"
805-
"#,
806-
)
807-
.file("src/lib.rs", "")
808-
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
809-
.file("bar/src/lib.rs", r#""#)
810-
.build();
811-
812-
p.cargo("build")
813-
.with_stderr(
814-
"\
815-
[UPDATING] `[ROOT][..]` index
816-
[DOWNLOADING] crates ...
817-
[DOWNLOADED] bar v0.1.0 [..]
818-
[COMPILING] bar v0.1.0
819-
[COMPILING] foo v0.0.1 ([CWD])
820-
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
821-
",
822-
)
823-
.run();
824-
p.cargo("build").with_stderr("[FINISHED] [..]").run();
825-
826-
p.change_file(
827-
"Cargo.toml",
828-
r#"
829798
[package]
830799
name = "foo"
831800
version = "0.0.1"
@@ -837,13 +806,18 @@ fn add_patch_with_features() {
837806
[patch.crates-io]
838807
bar = { path = 'bar', features = ["some_feature"] }
839808
"#,
840-
);
809+
)
810+
.file("src/lib.rs", "")
811+
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
812+
.file("bar/src/lib.rs", r#""#)
813+
.build();
841814

842815
p.cargo("build")
843816
.with_stderr(
844817
"\
845818
[WARNING] patch for `bar` uses the features mechanism. \
846819
default-features and features will not take effect because the patch dependency does not support this mechanism
820+
[UPDATING] `[ROOT][..]` index
847821
[COMPILING] bar v0.1.0 ([CWD]/bar)
848822
[COMPILING] foo v0.0.1 ([CWD])
849823
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
@@ -869,37 +843,6 @@ fn add_patch_with_setting_default_features() {
869843
.file(
870844
"Cargo.toml",
871845
r#"
872-
[package]
873-
name = "foo"
874-
version = "0.0.1"
875-
authors = []
876-
877-
[dependencies]
878-
bar = "0.1.0"
879-
"#,
880-
)
881-
.file("src/lib.rs", "")
882-
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
883-
.file("bar/src/lib.rs", r#""#)
884-
.build();
885-
886-
p.cargo("build")
887-
.with_stderr(
888-
"\
889-
[UPDATING] `[ROOT][..]` index
890-
[DOWNLOADING] crates ...
891-
[DOWNLOADED] bar v0.1.0 [..]
892-
[COMPILING] bar v0.1.0
893-
[COMPILING] foo v0.0.1 ([CWD])
894-
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
895-
",
896-
)
897-
.run();
898-
p.cargo("build").with_stderr("[FINISHED] [..]").run();
899-
900-
p.change_file(
901-
"Cargo.toml",
902-
r#"
903846
[package]
904847
name = "foo"
905848
version = "0.0.1"
@@ -911,13 +854,18 @@ fn add_patch_with_setting_default_features() {
911854
[patch.crates-io]
912855
bar = { path = 'bar', default-features = false, features = ["none_default_feature"] }
913856
"#,
914-
);
857+
)
858+
.file("src/lib.rs", "")
859+
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
860+
.file("bar/src/lib.rs", r#""#)
861+
.build();
915862

916863
p.cargo("build")
917864
.with_stderr(
918865
"\
919866
[WARNING] patch for `bar` uses the features mechanism. \
920867
default-features and features will not take effect because the patch dependency does not support this mechanism
868+
[UPDATING] `[ROOT][..]` index
921869
[COMPILING] bar v0.1.0 ([CWD]/bar)
922870
[COMPILING] foo v0.0.1 ([CWD])
923871
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]

0 commit comments

Comments
 (0)