xref: /freebsd/bin/pkill/tests/pgrep-l_test.sh (revision 6be3386466ab79a84b48429ae66244f21526d3df)
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