xref: /freebsd/bin/pkill/tests/pgrep-i_test.sh (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
1#!/bin/sh
2
3base=`basename $0`
4
5echo "1..1"
6
7name="pgrep -i"
8sleep=$(pwd)/sleep.txt
9usleep="${sleep}XXX"
10touch $usleep
11lsleep="${sleep}xxx"
12ln -sf /bin/sleep $usleep
13$usleep 5 &
14sleep 0.3
15chpid=$!
16pid=`pgrep -f -i $lsleep`
17if [ "$pid" = "$chpid" ]; then
18	echo "ok - $name"
19else
20	echo "not ok - $name"
21fi
22kill $chpid
23rm -f $sleep $usleep
24