File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -373,6 +373,52 @@ args: ["-NotAnArg"]
373373 . run ( ) ;
374374}
375375
376+ #[ cargo_test]
377+ fn default_verbosity ( ) {
378+ let script = ECHO_SCRIPT ;
379+ let p = cargo_test_support:: project ( )
380+ . file ( "script.rs" , script)
381+ . build ( ) ;
382+
383+ p. cargo ( "-Zscript script.rs -NotAnArg" )
384+ . masquerade_as_nightly_cargo ( & [ "script" ] )
385+ . with_stdout (
386+ r#"bin: [..]/debug/script[EXE]
387+ args: ["-NotAnArg"]
388+ "# ,
389+ )
390+ . with_stderr (
391+ "\
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`
396+ " ,
397+ )
398+ . run ( ) ;
399+ }
400+
401+ #[ cargo_test]
402+ fn quiet ( ) {
403+ let script = ECHO_SCRIPT ;
404+ let p = cargo_test_support:: project ( )
405+ . file ( "script.rs" , script)
406+ . build ( ) ;
407+
408+ p. cargo ( "-Zscript -q script.rs -NotAnArg" )
409+ . masquerade_as_nightly_cargo ( & [ "script" ] )
410+ . with_stdout (
411+ r#"bin: [..]/debug/script[EXE]
412+ args: ["-NotAnArg"]
413+ "# ,
414+ )
415+ . with_stderr (
416+ "\
417+ ",
418+ )
419+ . run ( ) ;
420+ }
421+
376422#[ cargo_test]
377423fn test_line_numbering_preserved ( ) {
378424 let script = r#"#!/usr/bin/env cargo
You can’t perform that action at this time.
0 commit comments