File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -591,3 +591,33 @@ args: []
591
591
)
592
592
. run ( ) ;
593
593
}
594
+
595
+ #[ cargo_test]
596
+ fn no_local_lockfile ( ) {
597
+ let script = ECHO_SCRIPT ;
598
+ let p = cargo_test_support:: project ( )
599
+ . file ( "script.rs" , script)
600
+ . build ( ) ;
601
+ let local_lockfile_path = p. root ( ) . join ( "Cargo.lock" ) ;
602
+
603
+ assert ! ( !local_lockfile_path. exists( ) ) ;
604
+
605
+ p. cargo ( "-Zscript script.rs" )
606
+ . masquerade_as_nightly_cargo ( & [ "script" ] )
607
+ . with_stdout (
608
+ r#"bin: [ROOT]/home/.cargo/target/[..]/debug/script[EXE]
609
+ args: []
610
+ "# ,
611
+ )
612
+ . with_stderr (
613
+ "\
614
+ [WARNING] `package.edition` is unspecifiead, defaulting to `2021`
615
+ [COMPILING] script v0.0.0 ([ROOT]/foo)
616
+ [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
617
+ [RUNNING] `[ROOT]/home/.cargo/target/[..]/debug/script[EXE]`
618
+ " ,
619
+ )
620
+ . run ( ) ;
621
+
622
+ assert ! ( local_lockfile_path. exists( ) ) ;
623
+ }
You can’t perform that action at this time.
0 commit comments