]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - bin/pkill/tests/pgrep-_s_test.sh
MFC various moves of tools/regressions/ tests to the new infrastructure.
[FreeBSD/stable/10.git] / bin / pkill / tests / pgrep-_s_test.sh
1 #!/bin/sh
2 # $FreeBSD$
3
4 base=`basename $0`
5
6 echo "1..2"
7
8 exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')"
9
10 name="pgrep -S"
11 pid=`pgrep -Sx idle`
12 if [ "$pid" = "$exp_pid" ]; then
13         echo "ok 1 - $name"
14 else
15         echo "not ok 1 - $name"
16 fi
17 pid=`pgrep -x idle`
18 if [ "$pid" != "$exp_pid" ]; then
19         echo "ok 2 - $name"
20 else
21         echo "not ok 2 - $name"
22 fi