File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -290,8 +290,9 @@ impl Settings {
290290 . map ( |v| v. map ( Input :: from) . collect ( ) )
291291 . unwrap_or_else ( || vec ! [ Input :: default ( ) ] ) ;
292292
293- settings. verbose =
294- settings. inputs . len ( ) > 1 && !matches. get_flag ( options:: verbosity:: QUIET ) ;
293+ settings. verbose = ( matches. get_flag ( options:: verbosity:: VERBOSE )
294+ || settings. inputs . len ( ) > 1 )
295+ && !matches. get_flag ( options:: verbosity:: QUIET ) ;
295296
296297 Ok ( settings)
297298 }
Original file line number Diff line number Diff line change @@ -96,16 +96,14 @@ fn test_stdin_explicit() {
9696}
9797
9898#[ test]
99- // FIXME: the -f test fails with: Assertion failed. Expected 'tail' to be running but exited with status=exit status: 0
100- #[ ignore = "disabled until fixed" ]
10199#[ cfg( not( target_vendor = "apple" ) ) ] // FIXME: for currently not working platforms
102100fn test_stdin_redirect_file ( ) {
103101 // $ echo foo > f
104102
105103 // $ tail < f
106104 // foo
107105
108- // $ tail -f < f
106+ // $ tail -v < f
109107 // foo
110108 //
111109
@@ -122,6 +120,22 @@ fn test_stdin_redirect_file() {
122120 . arg ( "-v" )
123121 . succeeds ( )
124122 . stdout_only ( "==> standard input <==\n foo" ) ;
123+ }
124+
125+ #[ test]
126+ // FIXME: the -f test fails with: Assertion failed. Expected 'tail' to be running but exited with status=exit status: 0
127+ #[ ignore = "disabled until fixed" ]
128+ #[ cfg( not( target_vendor = "apple" ) ) ] // FIXME: for currently not working platforms
129+ fn test_stdin_redirect_file_follow ( ) {
130+ // $ echo foo > f
131+
132+ // $ tail -f < f
133+ // foo
134+ //
135+
136+ let ts = TestScenario :: new ( util_name ! ( ) ) ;
137+ let at = & ts. fixtures ;
138+ at. write ( "f" , "foo" ) ;
125139
126140 let mut p = ts
127141 . ucmd ( )
You can’t perform that action at this time.
0 commit comments