pgrep: warning about 15+ chars name only if zero matches found

This avoids situations where longer regex which matches short-named proc is used.
Test for pgrep updated.
This commit is contained in:
Jan Rybar
2016-11-22 17:42:54 +01:00
parent 19649938ec
commit 1aacf4af7f
2 changed files with 7 additions and 9 deletions

View File

@@ -118,9 +118,9 @@ set test "pgrep does not match substring with exact"
spawn $pgrep -x $testproc_trim
expect_blank $test
set test "pgrep with long match gives warning"
set test "pgrep with long non-matching pattern gives warning"
spawn $pgrep gnome-session-bi
expect_pass "$test" "pattern that contains program name longer than 15 characters will result in zero matches"
expect_pass "$test" "pattern that searches for process name longer than 15 characters will result in zero matches"
# Cleanup
kill_testproc