@@ -26,7 +26,7 @@ fn basic_rs() {
2626 . file ( "echo.rs" , ECHO_SCRIPT )
2727 . build ( ) ;
2828
29- p. cargo ( "-Zscript echo.rs" )
29+ p. cargo ( "-Zscript -v echo.rs" )
3030 . masquerade_as_nightly_cargo ( & [ "script" ] )
3131 . with_stdout (
3232 r#"bin: [..]/debug/echo[EXE]
@@ -50,7 +50,7 @@ fn basic_path() {
5050 . file ( "echo" , ECHO_SCRIPT )
5151 . build ( ) ;
5252
53- p. cargo ( "-Zscript ./echo" )
53+ p. cargo ( "-Zscript -v ./echo" )
5454 . masquerade_as_nightly_cargo ( & [ "script" ] )
5555 . with_stdout (
5656 r#"bin: [..]/debug/echo[EXE]
@@ -74,7 +74,7 @@ fn basic_cargo_toml() {
7474 . file ( "src/main.rs" , ECHO_SCRIPT )
7575 . build ( ) ;
7676
77- p. cargo ( "-Zscript Cargo.toml" )
77+ p. cargo ( "-Zscript -v Cargo.toml" )
7878 . masquerade_as_nightly_cargo ( & [ "script" ] )
7979 . with_stdout (
8080 r#"bin: target/debug/foo[EXE]
@@ -97,7 +97,7 @@ fn path_required() {
9797 . file ( "echo" , ECHO_SCRIPT )
9898 . build ( ) ;
9999
100- p. cargo ( "-Zscript echo" )
100+ p. cargo ( "-Zscript -v echo" )
101101 . masquerade_as_nightly_cargo ( & [ "script" ] )
102102 . with_status ( 101 )
103103 . with_stdout ( "" )
@@ -126,7 +126,7 @@ fn manifest_precedence_over_plugins() {
126126 path. push ( p. root ( ) . join ( "path-test" ) ) ;
127127 let path = std:: env:: join_paths ( path. iter ( ) ) . unwrap ( ) ;
128128
129- p. cargo ( "-Zscript echo.rs" )
129+ p. cargo ( "-Zscript -v echo.rs" )
130130 . env ( "PATH" , & path)
131131 . masquerade_as_nightly_cargo ( & [ "script" ] )
132132 . with_stdout (
@@ -157,7 +157,7 @@ fn warn_when_plugin_masks_manifest_on_stable() {
157157 path. push ( p. root ( ) . join ( "path-test" ) ) ;
158158 let path = std:: env:: join_paths ( path. iter ( ) ) . unwrap ( ) ;
159159
160- p. cargo ( "echo.rs" )
160+ p. cargo ( "-v echo.rs" )
161161 . env ( "PATH" , & path)
162162 . with_stdout ( "" )
163163 . with_stderr (
@@ -176,7 +176,7 @@ fn requires_nightly() {
176176 . file ( "echo.rs" , ECHO_SCRIPT )
177177 . build ( ) ;
178178
179- p. cargo ( "echo.rs" )
179+ p. cargo ( "-v echo.rs" )
180180 . with_status ( 101 )
181181 . with_stdout ( "" )
182182 . with_stderr (
@@ -193,7 +193,7 @@ fn requires_z_flag() {
193193 . file ( "echo.rs" , ECHO_SCRIPT )
194194 . build ( ) ;
195195
196- p. cargo ( "echo.rs" )
196+ p. cargo ( "-v echo.rs" )
197197 . masquerade_as_nightly_cargo ( & [ "script" ] )
198198 . with_status ( 101 )
199199 . with_stdout ( "" )
@@ -221,7 +221,7 @@ fn main() {
221221 . file ( "script.rs" , script)
222222 . build ( ) ;
223223
224- p. cargo ( "-Zscript script.rs" )
224+ p. cargo ( "-Zscript -v script.rs" )
225225 . masquerade_as_nightly_cargo ( & [ "script" ] )
226226 . with_stdout (
227227 r#"Hello world!
@@ -252,7 +252,7 @@ fn main() {
252252 . file ( "script.rs" , script)
253253 . build ( ) ;
254254
255- p. cargo ( "-Zscript script.rs" )
255+ p. cargo ( "-Zscript -v script.rs" )
256256 . masquerade_as_nightly_cargo ( & [ "script" ] )
257257 . with_stdout (
258258 r#"Hello world!
@@ -281,7 +281,7 @@ fn main() {
281281 . file ( "script.rs" , script)
282282 . build ( ) ;
283283
284- p. cargo ( "-Zscript script.rs" )
284+ p. cargo ( "-Zscript -v script.rs" )
285285 . masquerade_as_nightly_cargo ( & [ "script" ] )
286286 . with_stdout (
287287 r#"msg = undefined
@@ -298,7 +298,7 @@ fn main() {
298298 . run ( ) ;
299299
300300 // Verify we don't rebuild
301- p. cargo ( "-Zscript script.rs" )
301+ p. cargo ( "-Zscript -v script.rs" )
302302 . masquerade_as_nightly_cargo ( & [ "script" ] )
303303 . with_stdout (
304304 r#"msg = undefined
@@ -314,7 +314,7 @@ fn main() {
314314 . run ( ) ;
315315
316316 // Verify we do rebuild
317- p. cargo ( "-Zscript script.rs" )
317+ p. cargo ( "-Zscript -v script.rs" )
318318 . env ( "_MESSAGE" , "hello" )
319319 . masquerade_as_nightly_cargo ( & [ "script" ] )
320320 . with_stdout (
@@ -374,7 +374,7 @@ args: ["-NotAnArg"]
374374}
375375
376376#[ cargo_test]
377- fn default_verbosity ( ) {
377+ fn default_programmatic_verbosity ( ) {
378378 let script = ECHO_SCRIPT ;
379379 let p = cargo_test_support:: project ( )
380380 . file ( "script.rs" , script)
@@ -389,10 +389,6 @@ args: ["-NotAnArg"]
389389 )
390390 . with_stderr (
391391 "\
392- [WARNING] `package.edition` is unspecifiead, defaulting to `2021`
393- [COMPILING] script v0.0.0 ([ROOT]/foo)
394- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
395- [RUNNING] `[..]/debug/script[EXE] -NotAnArg`
396392 ",
397393 )
398394 . run ( ) ;
@@ -431,7 +427,7 @@ fn main() {
431427 . file ( "script.rs" , script)
432428 . build ( ) ;
433429
434- p. cargo ( "-Zscript script.rs" )
430+ p. cargo ( "-Zscript -v script.rs" )
435431 . masquerade_as_nightly_cargo ( & [ "script" ] )
436432 . with_stdout (
437433 r#"line: 4
@@ -455,7 +451,7 @@ fn test_escaped_hyphen_arg() {
455451 . file ( "script.rs" , script)
456452 . build ( ) ;
457453
458- p. cargo ( "-Zscript -- script.rs -NotAnArg" )
454+ p. cargo ( "-Zscript -v - - script.rs -NotAnArg" )
459455 . masquerade_as_nightly_cargo ( & [ "script" ] )
460456 . with_stdout (
461457 r#"bin: [..]/debug/script[EXE]
@@ -480,7 +476,7 @@ fn test_unescaped_hyphen_arg() {
480476 . file ( "script.rs" , script)
481477 . build ( ) ;
482478
483- p. cargo ( "-Zscript script.rs -NotAnArg" )
479+ p. cargo ( "-Zscript -v script.rs -NotAnArg" )
484480 . masquerade_as_nightly_cargo ( & [ "script" ] )
485481 . with_stdout (
486482 r#"bin: [..]/debug/script[EXE]
@@ -505,7 +501,7 @@ fn test_same_flags() {
505501 . file ( "script.rs" , script)
506502 . build ( ) ;
507503
508- p. cargo ( "-Zscript script.rs --help" )
504+ p. cargo ( "-Zscript -v script.rs --help" )
509505 . masquerade_as_nightly_cargo ( & [ "script" ] )
510506 . with_stdout (
511507 r#"bin: [..]/debug/script[EXE]
@@ -530,7 +526,7 @@ fn test_name_has_weird_chars() {
530526 . file ( "s-h.w§c!.rs" , script)
531527 . build ( ) ;
532528
533- p. cargo ( "-Zscript s-h.w§c!.rs" )
529+ p. cargo ( "-Zscript -v s-h.w§c!.rs" )
534530 . masquerade_as_nightly_cargo ( & [ "script" ] )
535531 . with_stdout (
536532 r#"bin: [..]/debug/s-h-w-c-[EXE]
@@ -553,7 +549,7 @@ fn script_like_dir() {
553549 . file ( "script.rs/foo" , "something" )
554550 . build ( ) ;
555551
556- p. cargo ( "-Zscript script.rs" )
552+ p. cargo ( "-Zscript -v script.rs" )
557553 . masquerade_as_nightly_cargo ( & [ "script" ] )
558554 . with_status ( 101 )
559555 . with_stderr (
@@ -568,7 +564,7 @@ error: manifest path `script.rs` is a directory but expected a file
568564fn missing_script_rs ( ) {
569565 let p = cargo_test_support:: project ( ) . build ( ) ;
570566
571- p. cargo ( "-Zscript script.rs" )
567+ p. cargo ( "-Zscript -v script.rs" )
572568 . masquerade_as_nightly_cargo ( & [ "script" ] )
573569 . with_status ( 101 )
574570 . with_stderr (
@@ -596,7 +592,7 @@ fn main() {
596592 . file ( "script.rs" , script)
597593 . build ( ) ;
598594
599- p. cargo ( "-Zscript script.rs --help" )
595+ p. cargo ( "-Zscript -v script.rs --help" )
600596 . masquerade_as_nightly_cargo ( & [ "script" ] )
601597 . with_stdout (
602598 r#"Hello world!
@@ -636,7 +632,7 @@ fn main() {
636632 . file ( "bar/src/lib.rs" , "pub fn bar() {}" )
637633 . build ( ) ;
638634
639- p. cargo ( "-Zscript script.rs --help" )
635+ p. cargo ( "-Zscript -v script.rs --help" )
640636 . masquerade_as_nightly_cargo ( & [ "script" ] )
641637 . with_stdout (
642638 r#"Hello world!
@@ -666,7 +662,7 @@ fn main() {
666662 . file ( "build.rs" , "broken" )
667663 . build ( ) ;
668664
669- p. cargo ( "-Zscript script.rs --help" )
665+ p. cargo ( "-Zscript -v script.rs --help" )
670666 . masquerade_as_nightly_cargo ( & [ "script" ] )
671667 . with_stdout (
672668 r#"Hello world!
@@ -695,7 +691,7 @@ fn main() {
695691 . file ( "src/bin/not-script/main.rs" , "fn main() {}" )
696692 . build ( ) ;
697693
698- p. cargo ( "-Zscript script.rs --help" )
694+ p. cargo ( "-Zscript -v script.rs --help" )
699695 . masquerade_as_nightly_cargo ( & [ "script" ] )
700696 . with_stdout (
701697 r#"Hello world!
@@ -719,7 +715,7 @@ fn implicit_target_dir() {
719715 . file ( "script.rs" , script)
720716 . build ( ) ;
721717
722- p. cargo ( "-Zscript script.rs" )
718+ p. cargo ( "-Zscript -v script.rs" )
723719 . masquerade_as_nightly_cargo ( & [ "script" ] )
724720 . with_stdout (
725721 r#"bin: [ROOT]/home/.cargo/target/[..]/debug/script[EXE]
@@ -747,7 +743,7 @@ fn no_local_lockfile() {
747743
748744 assert ! ( !local_lockfile_path. exists( ) ) ;
749745
750- p. cargo ( "-Zscript script.rs" )
746+ p. cargo ( "-Zscript -v script.rs" )
751747 . masquerade_as_nightly_cargo ( & [ "script" ] )
752748 . with_stdout (
753749 r#"bin: [ROOT]/home/.cargo/target/[..]/debug/script[EXE]
0 commit comments