File tree 1 file changed +39
-0
lines changed
1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,45 @@ in package source
283
283
. run ( ) ;
284
284
}
285
285
286
+ #[ cargo_test]
287
+ fn orig_file_collision ( ) {
288
+ let p = project ( ) . build ( ) ;
289
+ let _ = git:: repo ( & paths:: root ( ) . join ( "foo" ) )
290
+ . file (
291
+ "Cargo.toml" ,
292
+ r#"
293
+ [project]
294
+ name = "foo"
295
+ description = "foo"
296
+ version = "0.0.1"
297
+ authors = []
298
+ license = "MIT"
299
+ documentation = "foo"
300
+ homepage = "foo"
301
+ repository = "foo"
302
+ exclude = ["*.no-existe"]
303
+ "# ,
304
+ )
305
+ . file (
306
+ "src/main.rs" ,
307
+ r#"
308
+ fn main() {}
309
+ "# ,
310
+ )
311
+ . file ( "Cargo.toml.orig" , "oops" )
312
+ . build ( ) ;
313
+ p. cargo ( "package" )
314
+ . arg ( "--no-verify" )
315
+ . with_status ( 101 )
316
+ . with_stderr (
317
+ "\
318
+ [ERROR] invalid inclusion of reserved file name Cargo.toml.orig \
319
+ in package source
320
+ " ,
321
+ )
322
+ . run ( ) ;
323
+ }
324
+
286
325
#[ cargo_test]
287
326
fn path_dependency_no_version ( ) {
288
327
let p = project ( )
You can’t perform that action at this time.
0 commit comments