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]
|
||||
bar = "*"
|
||||
[dev-dependencies]
|
||||
foobar = "*"
|
||||
"#,
|
||||
)
|
||||
.build();
|
||||
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();
|
||||
|
||||
p.cargo("metadata -q --format-version 1")
|
||||
@ -278,77 +281,32 @@ fn cargo_metadata_with_deps_and_version() {
|
||||
"categories": [],
|
||||
"dependencies": [],
|
||||
"description": null,
|
||||
"edition": "2015",
|
||||
"features": {},
|
||||
"id": "baz 0.0.1 (registry+[..])",
|
||||
"id": "baz 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": "baz",
|
||||
"readme": null,
|
||||
"repository": null,
|
||||
"source": "registry+[..]",
|
||||
"license": null,
|
||||
"license_file": null,
|
||||
"description": null,
|
||||
"edition": "2015",
|
||||
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||
"targets": [
|
||||
{
|
||||
"kind": [
|
||||
"lib"
|
||||
],
|
||||
"crate_types": [
|
||||
"lib"
|
||||
],
|
||||
"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": [
|
||||
"lib"
|
||||
],
|
||||
"crate_types": [
|
||||
"lib"
|
||||
],
|
||||
"edition": "2015",
|
||||
"name": "bar",
|
||||
"src_path": "[..]lib.rs"
|
||||
"name": "baz",
|
||||
"src_path": "[..]src/lib.rs"
|
||||
}
|
||||
],
|
||||
"version": "0.0.1",
|
||||
"metadata": null
|
||||
"version": "0.0.1"
|
||||
},
|
||||
{
|
||||
"authors": [],
|
||||
@ -359,76 +317,182 @@ fn cargo_metadata_with_deps_and_version() {
|
||||
"kind": null,
|
||||
"name": "bar",
|
||||
"optional": false,
|
||||
"rename": null,
|
||||
"req": "*",
|
||||
"source": "registry+[..]",
|
||||
"source": "registry+https://github.com/rust-lang/crates.io-index",
|
||||
"target": null,
|
||||
"uses_default_features": true,
|
||||
"rename": null
|
||||
"uses_default_features": true
|
||||
},
|
||||
{
|
||||
"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": {},
|
||||
"id": "foo 0.5.0 (path+file:[..]foo)",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"license_file": null,
|
||||
"manifest_path": "[..]Cargo.toml",
|
||||
"metadata": null,
|
||||
"name": "foo",
|
||||
"readme": null,
|
||||
"repository": null,
|
||||
"source": null,
|
||||
"license": "MIT",
|
||||
"license_file": null,
|
||||
"description": "foo",
|
||||
"edition": "2015",
|
||||
"targets": [
|
||||
{
|
||||
"kind": [
|
||||
"bin"
|
||||
],
|
||||
"crate_types": [
|
||||
"bin"
|
||||
],
|
||||
"edition": "2015",
|
||||
"kind": [
|
||||
"bin"
|
||||
],
|
||||
"name": "foo",
|
||||
"src_path": "[..]foo.rs"
|
||||
"src_path": "[..]src/foo.rs"
|
||||
}
|
||||
],
|
||||
"version": "0.5.0",
|
||||
"metadata": null
|
||||
"version": "0.5.0"
|
||||
},
|
||||
{
|
||||
"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": {
|
||||
"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": [
|
||||
"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": [
|
||||
{ "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": [],
|
||||
"id": "foo 0.5.0 (path+file:[..]foo)"
|
||||
},
|
||||
{
|
||||
"dependencies": [
|
||||
"baz 0.0.1 (registry+[..])"
|
||||
"baz 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||
],
|
||||
"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": [],
|
||||
"id": "bar 0.0.1 (registry+[..])"
|
||||
},
|
||||
{
|
||||
"dependencies": [],
|
||||
"deps": [],
|
||||
"features": [],
|
||||
"id": "baz 0.0.1 (registry+[..])"
|
||||
"id": "bar 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)"
|
||||
}
|
||||
],
|
||||
"root": "foo 0.5.0 (path+file:[..]foo)"
|
||||
},
|
||||
"target_directory": "[..]foo/target",
|
||||
"version": 1,
|
||||
"workspace_members": [
|
||||
"foo 0.5.0 (path+file:[..]foo)"
|
||||
],
|
||||
"workspace_root": "[..]/foo"
|
||||
}"#,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user