mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #6409 - spk:add-dev-deps-metadata-test, r=ehuss
Add dev-dependencies test on cargo_metadata_with_deps_and_version Hi, this just add some test for `dev-dependencies` on metadata with some registery update for others tests `+https://github.com/rust-lang/crates.io-index` (let me know if I should do another PR), cheers
This commit is contained in:
commit
7d270339ee
@ -262,10 +262,13 @@ fn cargo_metadata_with_deps_and_version() {
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bar = "*"
|
bar = "*"
|
||||||
|
[dev-dependencies]
|
||||||
|
foobar = "*"
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.build();
|
.build();
|
||||||
Package::new("baz", "0.0.1").publish();
|
Package::new("baz", "0.0.1").publish();
|
||||||
|
Package::new("foobar", "0.0.1").publish();
|
||||||
Package::new("bar", "0.0.1").dep("baz", "0.0.1").publish();
|
Package::new("bar", "0.0.1").dep("baz", "0.0.1").publish();
|
||||||
|
|
||||||
p.cargo("metadata -q --format-version 1")
|
p.cargo("metadata -q --format-version 1")
|
||||||
@ -278,77 +281,32 @@ fn cargo_metadata_with_deps_and_version() {
|
|||||||
"categories": [],
|
"categories": [],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"description": null,
|
"description": null,
|
||||||
|
"edition": "2015",
|
||||||
"features": {},
|
"features": {},
|
||||||
"id": "baz 0.0.1 (registry+[..])",
|
"id": "baz 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
"license": null,
|
||||||
|
"license_file": null,
|
||||||
"manifest_path": "[..]Cargo.toml",
|
"manifest_path": "[..]Cargo.toml",
|
||||||
|
"metadata": null,
|
||||||
"name": "baz",
|
"name": "baz",
|
||||||
"readme": null,
|
"readme": null,
|
||||||
"repository": null,
|
"repository": null,
|
||||||
"source": "registry+[..]",
|
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||||
"license": null,
|
|
||||||
"license_file": null,
|
|
||||||
"description": null,
|
|
||||||
"edition": "2015",
|
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"kind": [
|
|
||||||
"lib"
|
|
||||||
],
|
|
||||||
"crate_types": [
|
"crate_types": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"edition": "2015",
|
"edition": "2015",
|
||||||
"name": "baz",
|
|
||||||
"src_path": "[..]lib.rs"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version": "0.0.1",
|
|
||||||
"metadata": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"authors": [],
|
|
||||||
"categories": [],
|
|
||||||
"dependencies": [
|
|
||||||
{
|
|
||||||
"features": [],
|
|
||||||
"kind": null,
|
|
||||||
"name": "baz",
|
|
||||||
"optional": false,
|
|
||||||
"req": "^0.0.1",
|
|
||||||
"source": "registry+[..]",
|
|
||||||
"target": null,
|
|
||||||
"uses_default_features": true,
|
|
||||||
"rename": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"features": {},
|
|
||||||
"id": "bar 0.0.1 (registry+[..])",
|
|
||||||
"keywords": [],
|
|
||||||
"manifest_path": "[..]Cargo.toml",
|
|
||||||
"name": "bar",
|
|
||||||
"readme": null,
|
|
||||||
"repository": null,
|
|
||||||
"source": "registry+[..]",
|
|
||||||
"license": null,
|
|
||||||
"license_file": null,
|
|
||||||
"description": null,
|
|
||||||
"edition": "2015",
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"kind": [
|
"kind": [
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"crate_types": [
|
"name": "baz",
|
||||||
"lib"
|
"src_path": "[..]src/lib.rs"
|
||||||
],
|
|
||||||
"edition": "2015",
|
|
||||||
"name": "bar",
|
|
||||||
"src_path": "[..]lib.rs"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": "0.0.1",
|
"version": "0.0.1"
|
||||||
"metadata": null
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"authors": [],
|
"authors": [],
|
||||||
@ -359,76 +317,182 @@ fn cargo_metadata_with_deps_and_version() {
|
|||||||
"kind": null,
|
"kind": null,
|
||||||
"name": "bar",
|
"name": "bar",
|
||||||
"optional": false,
|
"optional": false,
|
||||||
|
"rename": null,
|
||||||
"req": "*",
|
"req": "*",
|
||||||
"source": "registry+[..]",
|
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||||
"target": null,
|
"target": null,
|
||||||
"uses_default_features": true,
|
"uses_default_features": true
|
||||||
"rename": null
|
},
|
||||||
|
{
|
||||||
|
"features": [],
|
||||||
|
"kind": "dev",
|
||||||
|
"name": "foobar",
|
||||||
|
"optional": false,
|
||||||
|
"rename": null,
|
||||||
|
"req": "*",
|
||||||
|
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||||
|
"target": null,
|
||||||
|
"uses_default_features": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"description": "foo",
|
||||||
|
"edition": "2015",
|
||||||
"features": {},
|
"features": {},
|
||||||
"id": "foo 0.5.0 (path+file:[..]foo)",
|
"id": "foo 0.5.0 (path+file:[..]foo)",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
"license": "MIT",
|
||||||
|
"license_file": null,
|
||||||
"manifest_path": "[..]Cargo.toml",
|
"manifest_path": "[..]Cargo.toml",
|
||||||
|
"metadata": null,
|
||||||
"name": "foo",
|
"name": "foo",
|
||||||
"readme": null,
|
"readme": null,
|
||||||
"repository": null,
|
"repository": null,
|
||||||
"source": null,
|
"source": null,
|
||||||
"license": "MIT",
|
|
||||||
"license_file": null,
|
|
||||||
"description": "foo",
|
|
||||||
"edition": "2015",
|
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"kind": [
|
|
||||||
"bin"
|
|
||||||
],
|
|
||||||
"crate_types": [
|
"crate_types": [
|
||||||
"bin"
|
"bin"
|
||||||
],
|
],
|
||||||
"edition": "2015",
|
"edition": "2015",
|
||||||
|
"kind": [
|
||||||
|
"bin"
|
||||||
|
],
|
||||||
"name": "foo",
|
"name": "foo",
|
||||||
"src_path": "[..]foo.rs"
|
"src_path": "[..]src/foo.rs"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": "0.5.0",
|
"version": "0.5.0"
|
||||||
"metadata": null
|
},
|
||||||
|
{
|
||||||
|
"authors": [],
|
||||||
|
"categories": [],
|
||||||
|
"dependencies": [],
|
||||||
|
"description": null,
|
||||||
|
"edition": "2015",
|
||||||
|
"features": {},
|
||||||
|
"id": "foobar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"keywords": [],
|
||||||
|
"license": null,
|
||||||
|
"license_file": null,
|
||||||
|
"manifest_path": "[..]Cargo.toml",
|
||||||
|
"metadata": null,
|
||||||
|
"name": "foobar",
|
||||||
|
"readme": null,
|
||||||
|
"repository": null,
|
||||||
|
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"crate_types": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"edition": "2015",
|
||||||
|
"kind": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"name": "foobar",
|
||||||
|
"src_path": "[..]src/lib.rs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "0.0.1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"authors": [],
|
||||||
|
"categories": [],
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"features": [],
|
||||||
|
"kind": null,
|
||||||
|
"name": "baz",
|
||||||
|
"optional": false,
|
||||||
|
"rename": null,
|
||||||
|
"req": "^0.0.1",
|
||||||
|
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||||
|
"target": null,
|
||||||
|
"uses_default_features": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": null,
|
||||||
|
"edition": "2015",
|
||||||
|
"features": {},
|
||||||
|
"id": "bar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"keywords": [],
|
||||||
|
"license": null,
|
||||||
|
"license_file": null,
|
||||||
|
"manifest_path": "[..]Cargo.toml",
|
||||||
|
"metadata": null,
|
||||||
|
"name": "bar",
|
||||||
|
"readme": null,
|
||||||
|
"repository": null,
|
||||||
|
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"crate_types": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"edition": "2015",
|
||||||
|
"kind": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"name": "bar",
|
||||||
|
"src_path": "[..]src/lib.rs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "0.0.1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"workspace_members": ["foo 0.5.0 (path+file:[..]foo)"],
|
|
||||||
"resolve": {
|
"resolve": {
|
||||||
"nodes": [
|
"nodes": [
|
||||||
|
{
|
||||||
|
"dependencies": [],
|
||||||
|
"deps": [],
|
||||||
|
"features": [],
|
||||||
|
"id": "baz 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dependencies": [],
|
||||||
|
"deps": [],
|
||||||
|
"features": [],
|
||||||
|
"id": "foobar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"bar 0.0.1 (registry+[..])"
|
"bar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"foobar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
],
|
],
|
||||||
"deps": [
|
"deps": [
|
||||||
{ "name": "bar", "pkg": "bar 0.0.1 (registry+[..])" }
|
{
|
||||||
|
"name": "bar",
|
||||||
|
"pkg": "bar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "foobar",
|
||||||
|
"pkg": "foobar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"features": [],
|
"features": [],
|
||||||
"id": "foo 0.5.0 (path+file:[..]foo)"
|
"id": "foo 0.5.0 (path+file:[..]foo)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"baz 0.0.1 (registry+[..])"
|
"baz 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
],
|
],
|
||||||
"deps": [
|
"deps": [
|
||||||
{ "name": "baz", "pkg": "baz 0.0.1 (registry+[..])" }
|
{
|
||||||
|
"name": "baz",
|
||||||
|
"pkg": "baz 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"features": [],
|
"features": [],
|
||||||
"id": "bar 0.0.1 (registry+[..])"
|
"id": "bar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||||
},
|
|
||||||
{
|
|
||||||
"dependencies": [],
|
|
||||||
"deps": [],
|
|
||||||
"features": [],
|
|
||||||
"id": "baz 0.0.1 (registry+[..])"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"root": "foo 0.5.0 (path+file:[..]foo)"
|
"root": "foo 0.5.0 (path+file:[..]foo)"
|
||||||
},
|
},
|
||||||
"target_directory": "[..]foo/target",
|
"target_directory": "[..]foo/target",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
|
"workspace_members": [
|
||||||
|
"foo 0.5.0 (path+file:[..]foo)"
|
||||||
|
],
|
||||||
"workspace_root": "[..]/foo"
|
"workspace_root": "[..]/foo"
|
||||||
}"#,
|
}"#,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user