]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - bin/pkill/tests/pgrep-_s_test.sh
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.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