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