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