Fix compile w/o openssl; disable sha256 & sha512 for --checksum.
[rsync.git] / testsuite / 00-hello.test
blobebd0683653c3582ba9fce0b73ef9a2bb240b34f2
1 #!/bin/sh
3 # Test some foundational things.
5 . "$suitedir/rsync.fns"
7 RSYNC_RSH="$scratchdir/src/support/lsh.sh"
8 export RSYNC_RSH
10 echo $0 running
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"
20 mkdir "$fromdir"
21 mkdir "$fromdir/$weird_name"
23 append_line() {
24 echo "$1"
25 echo "$1" >>"$fromdir/$weird_name/file"
28 append_line test1
29 checkit "$RSYNC -ai '$fromdir/' '$todir/'" "$fromdir" "$todir"
31 copy_weird() {
32 checkit "$RSYNC $1 --rsync-path='$RSYNC' '$2$fromdir/$weird_name/' '$3$todir/$weird_name'" "$fromdir" "$todir"
35 append_line test2
36 copy_weird '-ai' 'lh:' ''
38 append_line test3
39 copy_weird '-ai' '' 'lh:'
41 append_line test4
42 copy_weird '-ais' 'lh:' ''
44 append_line test5
45 copy_weird '-ais' '' 'lh:'
47 echo test6
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"
55 echo test7
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.
61 exit 0