diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 16:14:31 +0000 |
commit | 2d5707c7479eacb3b1ad98e01b53f56a88f8fb78 (patch) | |
tree | d9c334e83692851c02e3e1b8e65570c97bc82481 /testsuite/00-hello.test | |
parent | Initial commit. (diff) | |
download | rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.tar.xz rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.zip |
Adding upstream version 3.2.7.upstream/3.2.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | testsuite/00-hello.test | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/testsuite/00-hello.test b/testsuite/00-hello.test new file mode 100644 index 0000000..ebd0683 --- /dev/null +++ b/testsuite/00-hello.test @@ -0,0 +1,61 @@ +#!/bin/sh + +# Test some foundational things. + +. "$suitedir/rsync.fns" + +RSYNC_RSH="$scratchdir/src/support/lsh.sh" +export RSYNC_RSH + +echo $0 running + +$RSYNC --version || test_fail '--version output failed' + +$RSYNC --info=help || test_fail '--info=help output failed' + +$RSYNC --debug=help || test_fail '--debug=help output failed' + +weird_name="A weird)name" + +mkdir "$fromdir" +mkdir "$fromdir/$weird_name" + +append_line() { + echo "$1" + echo "$1" >>"$fromdir/$weird_name/file" +} + +append_line test1 +checkit "$RSYNC -ai '$fromdir/' '$todir/'" "$fromdir" "$todir" + +copy_weird() { + checkit "$RSYNC $1 --rsync-path='$RSYNC' '$2$fromdir/$weird_name/' '$3$todir/$weird_name'" "$fromdir" "$todir" +} + +append_line test2 +copy_weird '-ai' 'lh:' '' + +append_line test3 +copy_weird '-ai' '' 'lh:' + +append_line test4 +copy_weird '-ais' 'lh:' '' + +append_line test5 +copy_weird '-ais' '' 'lh:' + +echo test6 + +touch "$fromdir/one" "$fromdir/two" +(cd "$fromdir" && $RSYNC -ai --old-args --rsync-path="$RSYNC" lh:'one two' "$todir/") +if [ ! -f "$todir/one" ] || [ ! -f "$todir/two" ]; then + test_fail "old-args copy of 'one two' failed" +fi + +echo test7 + +rm "$todir/one" "$todir/two" +(cd "$fromdir" && RSYNC_OLD_ARGS=1 $RSYNC -ai --rsync-path="$RSYNC" lh:'one two' "$todir/") + +# The script would have aborted on error, so getting here means we've won. +exit 0 |