xref: /freebsd/bin/pkill/tests/pgrep-_s_test.sh (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1#!/bin/sh
2# $FreeBSD$
3
4base=`basename $0`
5
6echo "1..2"
7
8exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')"
9
10name="pgrep -S"
11pid=`pgrep -Sx idle`
12if [ "$pid" = "$exp_pid" ]; then
13	echo "ok 1 - $name"
14else
15	echo "not ok 1 - $name"
16fi
17pid=`pgrep -x idle`
18if [ "$pid" != "$exp_pid" ]; then
19	echo "ok 2 - $name"
20else
21	echo "not ok 2 - $name"
22fi
23