File tree 1 file changed +37
-0
lines changed 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,43 @@ fn quiet_arg() {
37
37
. run ( ) ;
38
38
}
39
39
40
+ #[ cargo_test]
41
+ fn unsupported_silent_arg ( ) {
42
+ let p = project ( )
43
+ . file ( "src/main.rs" , r#"fn main() { println!("hello"); }"# )
44
+ . build ( ) ;
45
+
46
+ p. cargo ( "run -s" )
47
+ . with_stderr (
48
+ "\
49
+ error: unexpected argument '-s' found
50
+
51
+ tip: to pass '-s' as a value, use '-- -s'
52
+
53
+ Usage: cargo run [OPTIONS] [args]...
54
+
55
+ For more information, try '--help'.
56
+ " ,
57
+ )
58
+ . with_status ( 1 )
59
+ . run ( ) ;
60
+
61
+ p. cargo ( "run --silent" )
62
+ . with_stderr (
63
+ "\
64
+ error: unexpected argument '--silent' found
65
+
66
+ tip: to pass '--silent' as a value, use '-- --silent'
67
+
68
+ Usage: cargo run [OPTIONS] [args]...
69
+
70
+ For more information, try '--help'.
71
+ " ,
72
+ )
73
+ . with_status ( 1 )
74
+ . run ( ) ;
75
+ }
76
+
40
77
#[ cargo_test]
41
78
fn quiet_arg_and_verbose_arg ( ) {
42
79
let p = project ( )
You can’t perform that action at this time.
0 commit comments