Skip to content

Commit

Permalink
Remove unrelated cases
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 committed Jul 9, 2021
1 parent 8d2103f commit a846226
Showing 1 changed file with 12 additions and 64 deletions.
76 changes: 12 additions & 64 deletions tests/testsuite/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -795,37 +795,6 @@ fn add_patch_with_features() {
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
authors = []
[dependencies]
bar = "0.1.0"
"#,
)
.file("src/lib.rs", "")
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file("bar/src/lib.rs", r#""#)
.build();

p.cargo("build")
.with_stderr(
"\
[UPDATING] `[ROOT][..]` index
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.0 [..]
[COMPILING] bar v0.1.0
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run();
p.cargo("build").with_stderr("[FINISHED] [..]").run();

p.change_file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
Expand All @@ -837,13 +806,18 @@ fn add_patch_with_features() {
[patch.crates-io]
bar = { path = 'bar', features = ["some_feature"] }
"#,
);
)
.file("src/lib.rs", "")
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file("bar/src/lib.rs", r#""#)
.build();

p.cargo("build")
.with_stderr(
"\
[WARNING] patch for `bar` uses the features mechanism. \
default-features and features will not take effect because the patch dependency does not support this mechanism
[UPDATING] `[ROOT][..]` index
[COMPILING] bar v0.1.0 ([CWD]/bar)
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
Expand All @@ -869,37 +843,6 @@ fn add_patch_with_setting_default_features() {
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
authors = []
[dependencies]
bar = "0.1.0"
"#,
)
.file("src/lib.rs", "")
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file("bar/src/lib.rs", r#""#)
.build();

p.cargo("build")
.with_stderr(
"\
[UPDATING] `[ROOT][..]` index
[DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.0 [..]
[COMPILING] bar v0.1.0
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run();
p.cargo("build").with_stderr("[FINISHED] [..]").run();

p.change_file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
Expand All @@ -911,13 +854,18 @@ fn add_patch_with_setting_default_features() {
[patch.crates-io]
bar = { path = 'bar', default-features = false, features = ["none_default_feature"] }
"#,
);
)
.file("src/lib.rs", "")
.file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file("bar/src/lib.rs", r#""#)
.build();

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

0 comments on commit a846226

Please sign in to comment.