3 # Test some foundational things.
5 .
"$suitedir/rsync.fns"
7 RSYNC_RSH
="$scratchdir/src/support/lsh.sh"
12 $RSYNC --version || test_fail
'--version output failed'
14 $RSYNC --info=help || test_fail
'--info=help output failed'
16 $RSYNC --debug=help || test_fail
'--debug=help output failed'
18 weird_name
="A weird)name"
21 mkdir
"$fromdir/$weird_name"
25 echo "$1" >>"$fromdir/$weird_name/file"
29 checkit
"$RSYNC -ai '$fromdir/' '$todir/'" "$fromdir" "$todir"
32 checkit
"$RSYNC $1 --rsync-path='$RSYNC' '$2$fromdir/$weird_name/' '$3$todir/$weird_name'" "$fromdir" "$todir"
36 copy_weird
'-ai' 'lh:' ''
39 copy_weird
'-ai' '' 'lh:'
42 copy_weird
'-ais' 'lh:' ''
45 copy_weird
'-ais' '' 'lh:'
49 touch "$fromdir/one" "$fromdir/two"
50 (cd "$fromdir" && $RSYNC -ai --old-args --rsync-path="$RSYNC" lh
:'one two' "$todir/")
51 if [ ! -f "$todir/one" ] ||
[ ! -f "$todir/two" ]; then
52 test_fail
"old-args copy of 'one two' failed"
57 rm "$todir/one" "$todir/two"
58 (cd "$fromdir" && RSYNC_OLD_ARGS
=1 $RSYNC -ai --rsync-path="$RSYNC" lh
:'one two' "$todir/")
60 # The script would have aborted on error, so getting here means we've won.