File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -3238,6 +3238,43 @@ required by package `foo v0.1.0 ([ROOT]/foo)`
3238
3238
. run ( ) ;
3239
3239
}
3240
3240
3241
+ #[ cargo_test]
3242
+ fn unknown_index_version_with_msrv_error ( ) {
3243
+ // If the version field is not understood, it is ignored.
3244
+ Package :: new ( "bar" , "1.0.1" )
3245
+ . schema_version ( u32:: MAX )
3246
+ . rust_version ( "1.2345" )
3247
+ . publish ( ) ;
3248
+
3249
+ let p = project ( )
3250
+ . file (
3251
+ "Cargo.toml" ,
3252
+ r#"
3253
+ [package]
3254
+ name = "foo"
3255
+ version = "0.1.0"
3256
+ edition = "2015"
3257
+
3258
+ [dependencies]
3259
+ bar = "1.0"
3260
+ "# ,
3261
+ )
3262
+ . file ( "src/lib.rs" , "" )
3263
+ . build ( ) ;
3264
+
3265
+ p. cargo ( "generate-lockfile" )
3266
+ . with_status ( 101 )
3267
+ . with_stderr_data ( str![ [ r#"
3268
+ [UPDATING] `dummy-registry` index
3269
+ [ERROR] no matching versions for `bar` found
3270
+ version 1.0.1 requires a Cargo version that supports index version 4294967295
3271
+ location searched: `dummy-registry` index (which is replacing registry `crates-io`)
3272
+ required by package `foo v0.1.0 ([ROOT]/foo)`
3273
+
3274
+ "# ] ] )
3275
+ . run ( ) ;
3276
+ }
3277
+
3241
3278
#[ cargo_test]
3242
3279
fn protocol ( ) {
3243
3280
cargo_process ( "install bar" )
You can’t perform that action at this time.
0 commit comments