xref: /freebsd/bin/pkill/tests/pgrep-l_test.sh (revision fed1ca4b719c56c930f2259d80663cd34be812bb)
1#!/bin/sh
2# $FreeBSD$
3
4base=`basename $0`
5
6echo "1..1"
7
8name="pgrep -l"
9sleep=$(pwd)/sleep.txt
10ln -sf /bin/sleep $sleep
11$sleep 5 &
12sleep 0.3
13pid=$!
14if [ "$pid $sleep 5" = "`pgrep -f -l $sleep`" ]; then
15	echo "ok - $name"
16else
17	echo "not ok - $name"
18fi
19kill $pid
20rm -f $sleep
21