Removing now-redundant path-size check from send_if_directory().
[rsync/rsync.git] / testsuite / files-from.test
CommitLineData
3ce3cabe
WD
1#!/bin/sh
2
3# Copyright (C) 2008 by Wayne Davison <wayned@samba.org>
4
5# This program is distributable under the terms of the GNU GPL (see
6# COPYING).
7
8# Test that --files-from=FILE works right.
9
10. "$suitedir/rsync.fns"
11
8e6b4ddb
WD
12SSH="$scratchdir/src/support/lsh"
13
3ce3cabe
WD
14hands_setup
15
16# This list of files skips the contents of "subsubdir" but includes
17# the contents of "subsubdir2" due to its trailing slash.
18cat >"$scratchdir/filelist" <<EOT
19from/./
20from/./dir/subdir
21from/./dir/subdir/subsubdir
22from/./dir/subdir/subsubdir2/
23from/./dir/subdir/foobar.baz
24EOT
25
26# Create a chkdir without the content that we expect to be omitted.
27$RSYNC -a --exclude=dir/text --exclude='subsubdir/**' "$fromdir/" "$chkdir/"
28
29checkit "$RSYNC -av --files-from='$scratchdir/filelist' '$scratchdir' '$todir/'" "$chkdir" "$todir"
30
8e6b4ddb
WD
31for filehost in '' 'localhost:'; do
32 for srchost in '' 'localhost:'; do
33 if [ -z "$srchost" ]; then
34 desthost='localhost:'
35 else
36 desthost=''
37 fi
38
39 rm -rf "$todir"
40 checkit "$RSYNC -avse '$SSH' --rsync-path='$RSYNC' --files-from='$filehost$scratchdir/filelist' '$srchost$scratchdir' '$desthost$todir/'" "$chkdir" "$todir"
41 done
42done
43
3ce3cabe
WD
44# The script would have aborted on error, so getting here means we've won.
45exit 0