summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorCraig Small <csmall@enc.com.au>2016-09-11 10:40:47 +1000
committerCraig Small <csmall@enc.com.au>2016-09-11 10:40:47 +1000
commit34d040a07915cf1d1e60065398db3f89a462c647 (patch)
tree14c4da65be2b35c8d29a1b165ba3c4f3bbdd69ed /testsuite
parent95ed10ff438ee1c850bbd235f1bd98e6113ccfe6 (diff)
downloadprocps-ng-34d040a07915cf1d1e60065398db3f89a462c647.tar.gz
pgrep: add warning that pattern exceeeds 15 chars
Add a warning if you specify a command over 15 characters and don't use the -f command. This is a pick of two patches from master: 24fd260 pgrep: Fix off by one error in line check 4a7f9fc pgrep - adds warning that pattern exceeds 15 chars without References: !25
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/pgrep.test/pgrep.exp4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/pgrep.test/pgrep.exp b/testsuite/pgrep.test/pgrep.exp
index ef26783..0e9084a 100644
--- a/testsuite/pgrep.test/pgrep.exp
+++ b/testsuite/pgrep.test/pgrep.exp
@@ -118,6 +118,10 @@ 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"
+spawn $pgrep gnome-session-bi
+expect_pass "$test" "pattern that contains program name longer than 15 characters will result in zero matches"
+
# Cleanup
kill_testproc