Files
rsync/testsuite/ssh-basic.test
a1346054 dde4695136 Minor cleanup (#214)
- use `grep -E` and `grep -F` (`egrep` and `fgrep` are non-standard)
- use same hashbang style for all test scripts
- use explicit comparisons in test scripts
- remove redundant ; from test scripts
- make test script not executable, just like all the other scripts
- unify codestyle across all test scripts
- make openssl license exception clearer by having it at the top
- use modern links in COPYING. The text now matches:
  https://www.gnu.org/licenses/gpl-3.0.txt
- fix typo
2021-09-26 16:57:55 -07:00

35 lines
1012 B
Bash

#!/bin/sh
# Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
# This program is distributable under the terms of the GNU GPL (see
# COPYING)
# This script tests ssh, if possible. It's called by runtests.sh
. "$suitedir/rsync.fns"
SSH="$scratchdir/src/support/lsh.sh"
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`" != "yes" ]; then
test_skipped "Skipping SSH tests because ssh connection to localhost not authorised"
fi
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 "$todir/text" "$todir/ThisShouldGo"
runtest "ssh: renamed file" 'checkit "$RSYNC --delete -avH -e \"$SSH\" --rsync-path=\"$RSYNC\" \"$fromdir/\" \"localhost:$todir\"" "$fromdir/" "$todir"'