File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,11 @@ pub struct Context {
8686 pub report : bool ,
8787
8888 /// Print human-readable disk usage in report
89- #[ arg( long) ]
89+ #[ arg( long, requires = "report" ) ]
9090 pub human : bool ,
9191
9292 /// Print file-name in report as opposed to full path
93- #[ arg( long) ]
93+ #[ arg( long, requires = "report" ) ]
9494 pub file_name : bool ,
9595
9696 /// Sort-order to display directory content
Original file line number Diff line number Diff line change @@ -73,3 +73,15 @@ fn report_with_level() {
7373 )
7474 )
7575}
76+
77+ #[ test]
78+ #[ should_panic]
79+ fn report_requires_human ( ) {
80+ utils:: run_cmd ( & [ "--human" ] ) ;
81+ }
82+
83+ #[ test]
84+ #[ should_panic]
85+ fn report_requires_file_name ( ) {
86+ utils:: run_cmd ( & [ "--file-name" ] ) ;
87+ }
You can’t perform that action at this time.
0 commit comments