#!/bin/sh
-. ./testlib.sh
+. "${0%/*}/testlib.sh"
+
+# Skip this test if we did not compile sptps_test
+
+test -e $sptps_test -a -e $sptps_keypair || exit 77
# Generate keys
# Test transfer of a simple file.
-(sleep 1; $sptps_test -q $d1/client.priv $d1/server.pub localhost 32750 <../README) &
-$sptps_test $d1/server.priv $d1/client.pub 32750 >$d1/out1
-cmp $d1/out1 ../README
+(sleep 1; $sptps_test -4 -q $d1/client.priv $d1/server.pub localhost 32750 <Makefile) &
+$sptps_test -4 $d1/server.priv $d1/client.pub 32750 >$d1/out1
+cmp $d1/out1 Makefile
-$sptps_test -q $d1/server.priv $d1/client.pub 32750 <../NEWS &
+$sptps_test -4 -q $d1/server.priv $d1/client.pub 32750 <Makefile &
sleep 1
-$sptps_test $d1/client.priv $d1/server.pub localhost 32750 > $d1/out2
-cmp $d1/out2 ../NEWS
+$sptps_test -4 $d1/client.priv $d1/server.pub localhost 32750 > $d1/out2
+cmp $d1/out2 Makefile
# Datagram mode
-$sptps_test -dq $d1/server.priv $d1/client.pub 32750 <../COPYING &
+$sptps_test -4 -dq $d1/server.priv $d1/client.pub 32750 <Makefile &
sleep 1
-sleep 1 | $sptps_test -dq $d1/client.priv $d1/server.pub localhost 32750 >$d1/out3
-cmp $d1/out3 ../COPYING
+sleep 1 | $sptps_test -4 -dq $d1/client.priv $d1/server.pub localhost 32750 >$d1/out3
+cmp $d1/out3 Makefile