#!/bin/sh
. "$suitedir/rsync.fns"
if [ "x$rsync_enable_ssh_tests" != xyes ]
then
test_skipped "Skipping SSH tests because \$rsync_enable_ssh_tests is not set"
fi
if ! type ssh >/dev/null ; then
test_skipped "Skipping SSH tests because ssh is not in the path"
fi
if ! [ "`ssh -o'BatchMode yes' localhost echo yes`" = "yes" ]; then
test_skipped "Skipping SSH tests because ssh conection to localhost not authorised"
fi
hands_setup
runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'
F1=`ls "$todir" | head -5 | tail -1`
mv "$todir/$F1" "$todir/ThisShouldGo"
runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'