summaryrefslogtreecommitdiff
path: root/testsuite/pgrep.test
diff options
context:
space:
mode:
authorClay Baenziger <cwb@clayb.net>2019-08-03 05:58:18 -0400
committerCraig Small <csmall@dropbear.xyz>2019-09-21 17:00:53 +1000
commite516cf4a1809a4f9e5dfb6d2b8a396e0ccbdef67 (patch)
tree766c431f24a3195f63337139358c000013e9d537 /testsuite/pgrep.test
parent61b627d53c9f025b8718b0f335ea38fa49358d9b (diff)
downloadprocps-ng-e516cf4a1809a4f9e5dfb6d2b8a396e0ccbdef67.tar.gz
testsuite: pgrep: Provide test for matching a more than 4k command line; beware as TCL does not seem to match on strings >4k
Diffstat (limited to 'testsuite/pgrep.test')
-rw-r--r--testsuite/pgrep.test/pgrep.exp8
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/pgrep.test/pgrep.exp b/testsuite/pgrep.test/pgrep.exp
index 66dd4c7..3a3e1e1 100644
--- a/testsuite/pgrep.test/pgrep.exp
+++ b/testsuite/pgrep.test/pgrep.exp
@@ -34,9 +34,9 @@ set test "pgrep with : delimiter"
spawn $pgrep -d : $testproc_comm
expect_pass "$test" "^${testproc1_pid}:${testproc2_pid}\\s*$"
-# FIXME - Need to test against -f flag
set test "pgrep match against full process name"
-untested $test
+spawn $pgrep -f "$testproc_path\\s+$testproc_arg_str"
+expect_pass "$test" "^$testproc1_pid\\s*$"
set test "pgrep with matching gid"
spawn $pgrep -G $gid $testproc_comm
@@ -51,8 +51,8 @@ spawn $pgrep -l $testproc_comm
expect_pass "$test" "^$testproc1_pid\\s+$testproc_comm\\s+$testproc2_pid\\s+$testproc_comm\\s*$"
set test "pgrep with full command line"
-spawn $pgrep -a $testproc_comm
-expect_pass "$test" "^$testproc1_pid\\s+$testproc_path\\s+$testproc2_pid\\s+$testproc_path\\s*$"
+spawn $pgrep -af "$testproc_path$"
+expect_pass "$test" "^$testproc2_pid\\s+$testproc_path\\s*$"
set test "pgrep find newest test pid"
spawn $pgrep -n $testproc_comm