#!/bin/sh
#
# All the previous tests use pty's to communicate between
# client and server, server and power controller.
# This one uses sockets.
#
TEST=t48
${TEST_BUILDDIR}/vpcd -p 10102 &
sleep 1

# -1 means handle one client connection and exit when it exits
# $TEST.conf file specifies nonstandard port of 10103
$PATH_POWERMAND -c ${TEST_BUILDDIR}/$TEST.conf -f -1 2>/dev/null&  
sleep 1

$PATH_POWERMAN -h localhost:10103 \
    -q -Q t1 -Q t[3-5] >$TEST.out 2>$TEST.err
test $? = 0 || exit 1
wait; wait
diff $TEST.out ${TEST_SRCDIR}/$TEST.exp >$TEST.diff
