mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Fix versioncheck test
This commit is contained in:
parent
5f04b50191
commit
1e7b1ccb2a
1 changed files with 6 additions and 6 deletions
|
@ -9,15 +9,15 @@ fn check_that_clippy_lints_and_clippy_utils_have_the_same_version_as_clippy() {
|
|||
.expect("could not obtain cargo metadata");
|
||||
|
||||
for krate in &["clippy_lints", "clippy_utils"] {
|
||||
let krate_meta = cargo_metadata::MetadataCommand::new()
|
||||
.current_dir(std::env::current_dir().unwrap().join(krate))
|
||||
.no_deps()
|
||||
.exec()
|
||||
let krate_meta = clippy_meta
|
||||
.packages
|
||||
.iter()
|
||||
.find(|package| package.name == *krate)
|
||||
.expect("could not obtain cargo metadata");
|
||||
assert_eq!(krate_meta.packages[0].version, clippy_meta.packages[0].version);
|
||||
assert_eq!(krate_meta.version, clippy_meta.packages[0].version);
|
||||
for package in &clippy_meta.packages[0].dependencies {
|
||||
if package.name == *krate {
|
||||
assert!(package.req.matches(&krate_meta.packages[0].version));
|
||||
assert!(package.req.matches(&krate_meta.version));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue