Allow $RSYNC_TEST_TMP to indicate a good tmp dir for our tests.
[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
12hands_setup
13
14# This list of files skips the contents of "subsubdir" but includes
15# the contents of "subsubdir2" due to its trailing slash.
16cat >"$scratchdir/filelist" <<EOT
17from/./
18from/./dir/subdir
19from/./dir/subdir/subsubdir
20from/./dir/subdir/subsubdir2/
21from/./dir/subdir/foobar.baz
22EOT
23
24# Create a chkdir without the content that we expect to be omitted.
25$RSYNC -a --exclude=dir/text --exclude='subsubdir/**' "$fromdir/" "$chkdir/"
26
27checkit "$RSYNC -av --files-from='$scratchdir/filelist' '$scratchdir' '$todir/'" "$chkdir" "$todir"
28
29# The script would have aborted on error, so getting here means we've won.
30exit 0