File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " clippy_utils"
3- version = " 0.1.0 "
4- authors = [" The Rust Project Developers" ]
3+ version = " 0.1.51 "
4+ authors = [" The Rust Clippy Developers" ]
55edition = " 2018"
66
77[dependencies ]
Original file line number Diff line number Diff line change 22use rustc_tools_util:: VersionInfo ;
33
44#[ test]
5- fn check_that_clippy_lints_has_the_same_version_as_clippy ( ) {
5+ fn check_that_clippy_lints_and_clippy_utils_have_the_same_version_as_clippy ( ) {
66 let clippy_meta = cargo_metadata:: MetadataCommand :: new ( )
77 . no_deps ( )
88 . exec ( )
99 . expect ( "could not obtain cargo metadata" ) ;
10- std:: env:: set_current_dir ( std:: env:: current_dir ( ) . unwrap ( ) . join ( "clippy_lints" ) ) . unwrap ( ) ;
11- let clippy_lints_meta = cargo_metadata:: MetadataCommand :: new ( )
12- . no_deps ( )
13- . exec ( )
14- . expect ( "could not obtain cargo metadata" ) ;
15- assert_eq ! ( clippy_lints_meta. packages[ 0 ] . version, clippy_meta. packages[ 0 ] . version) ;
16- for package in & clippy_meta. packages [ 0 ] . dependencies {
17- if package. name == "clippy_lints" {
18- assert ! ( package. req. matches( & clippy_lints_meta. packages[ 0 ] . version) ) ;
19- return ;
10+
11+ for krate in & [ "clippy_lints" , "clippy_utils" ] {
12+ let krate_meta = cargo_metadata:: MetadataCommand :: new ( )
13+ . current_dir ( std:: env:: current_dir ( ) . unwrap ( ) . join ( krate) )
14+ . no_deps ( )
15+ . exec ( )
16+ . expect ( "could not obtain cargo metadata" ) ;
17+ assert_eq ! ( krate_meta. packages[ 0 ] . version, clippy_meta. packages[ 0 ] . version) ;
18+ for package in & clippy_meta. packages [ 0 ] . dependencies {
19+ if package. name == * krate {
20+ assert ! ( package. req. matches( & krate_meta. packages[ 0 ] . version) ) ;
21+ break ;
22+ }
2023 }
2124 }
2225}
You can’t perform that action at this time.
0 commit comments