File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ pub fn get_match_settings(matches: &ArgMatches) -> UResult<Settings> {
7878 ) ) ;
7979 }
8080
81- if !settings. full && pattern. len ( ) >= 15 {
81+ if !settings. full && pattern. len ( ) > 15 {
8282 let msg = format ! ( "pattern that searches for process name longer than 15 characters will result in zero matches\n \
8383 Try `{} -f' option to match against the complete command line.", uucore:: util_name( ) ) ;
8484 return Err ( USimpleError :: new ( 1 , msg) ) ;
Original file line number Diff line number Diff line change @@ -380,7 +380,13 @@ fn test_does_not_match_pid() {
380380#[ cfg( target_os = "linux" ) ]
381381fn test_too_long_pattern ( ) {
382382 new_ucmd ! ( )
383- . arg ( "THIS_IS_OVER_16_CHARS" )
383+ . arg ( "A" . repeat ( 15 ) )
384+ . fails ( )
385+ . code_is ( 1 )
386+ . no_output ( ) ;
387+
388+ new_ucmd ! ( )
389+ . arg ( "A" . repeat ( 16 ) )
384390 . fails ( )
385391 . code_is ( 1 )
386392 . stderr_contains ( "pattern that searches for process name longer than 15 characters will result in zero matches" ) ;
You can’t perform that action at this time.
0 commit comments