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 1
1
[package ]
2
2
name = " clippy_utils"
3
- version = " 0.1.0 "
4
- authors = [" The Rust Project Developers" ]
3
+ version = " 0.1.51 "
4
+ authors = [" The Rust Clippy Developers" ]
5
5
edition = " 2018"
6
6
7
7
[dependencies ]
Original file line number Diff line number Diff line change 2
2
use rustc_tools_util:: VersionInfo ;
3
3
4
4
#[ 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 ( ) {
6
6
let clippy_meta = cargo_metadata:: MetadataCommand :: new ( )
7
7
. no_deps ( )
8
8
. exec ( )
9
9
. 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
+ }
20
23
}
21
24
}
22
25
}
You can’t perform that action at this time.
0 commit comments