Skip to content

Commit

Permalink
Merge similar tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Feb 9, 2022
1 parent c83d805 commit 5063633
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions tests/testsuite/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,6 @@ fn vendor_simple() {

Package::new("log", "0.3.5").publish();

p.cargo("vendor --respect-source-config").run();
let lock = p.read_file("vendor/log/Cargo.toml");
assert!(lock.contains("version = \"0.3.5\""));

add_vendor_config(&p);
p.cargo("build").run();
}

#[cargo_test]
fn vendor_sample_config() {
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.1.0"
[dependencies]
log = "0.3.5"
"#,
)
.file("src/lib.rs", "")
.build();

Package::new("log", "0.3.5").publish();

p.cargo("vendor --respect-source-config")
.with_stdout(
r#"
Expand All @@ -67,6 +40,11 @@ directory = "vendor"
"#,
)
.run();
let lock = p.read_file("vendor/log/Cargo.toml");
assert!(lock.contains("version = \"0.3.5\""));

add_vendor_config(&p);
p.cargo("build").run();
}

fn add_vendor_config(p: &Project) {
Expand Down

0 comments on commit 5063633

Please sign in to comment.