Fixed an "Internal abbrev error" when dealing with an xattr value
[rsync/rsync.git] / testsuite / ssh-basic.test
index e1aeb41..5914411 100644 (file)
 
 . "$suitedir/rsync.fns"
 
-if ! type ssh >/dev/null 2>&1; then
-    echo "Skipping SSH tests because ssh is not in the path"
-    exit 77
+SSH="$scratchdir/src/support/lsh"
+
+if test x"$rsync_enable_ssh_tests" = xyes; then
+    if type ssh >/dev/null ; then
+       SSH=ssh
+    fi
 fi
 
-if ! [ "`ssh -o'BatchMode yes' localhost echo yes 2>/dev/null`" = "yes" ]; then
-    echo "Skipping SSH tests because ssh conection to localhost not authorised"
-    exit 77
+if ! [ "`$SSH -o'BatchMode yes' localhost echo yes`" = "yes" ]; then
+    test_skipped "Skipping SSH tests because ssh conection to localhost not authorised"
 fi
 
-runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
+echo "Using remote shell: $SSH"
+
+# Create some files for rsync to copy
+hands_setup
+
+runtest "ssh: basic test" 'checkit "$RSYNC -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'
 
-mv ${TO}/${F1} ${TO}/ThisShouldGo
+mv "$todir/text" "$todir/ThisShouldGo"
 
-runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}'
+runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'