summaryrefslogtreecommitdiff
path: root/testsuite/files-from.test
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-11-09 21:37:04 -0800
committerWayne Davison <wayned@samba.org>2008-11-09 21:37:04 -0800
commit3ce3cabe346fed441b840102ec861483d64e126f (patch)
tree23a9f9ebc258f49a478478dd33a676505a9326f5 /testsuite/files-from.test
parent9411292489496984c8d5d9a446bf071afac3866d (diff)
downloadrsync-3ce3cabe346fed441b840102ec861483d64e126f.tar.gz
Fixed the use of a dot-dir path (foo/./bar) inside of a files-from file.
Diffstat (limited to 'testsuite/files-from.test')
-rw-r--r--testsuite/files-from.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/files-from.test b/testsuite/files-from.test
new file mode 100644
index 00000000..ea202025
--- /dev/null
+++ b/testsuite/files-from.test
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# Copyright (C) 2008 by Wayne Davison <wayned@samba.org>
+
+# This program is distributable under the terms of the GNU GPL (see
+# COPYING).
+
+# Test that --files-from=FILE works right.
+
+. "$suitedir/rsync.fns"
+
+hands_setup
+
+# This list of files skips the contents of "subsubdir" but includes
+# the contents of "subsubdir2" due to its trailing slash.
+cat >"$scratchdir/filelist" <<EOT
+from/./
+from/./dir/subdir
+from/./dir/subdir/subsubdir
+from/./dir/subdir/subsubdir2/
+from/./dir/subdir/foobar.baz
+EOT
+
+# Create a chkdir without the content that we expect to be omitted.
+$RSYNC -a --exclude=dir/text --exclude='subsubdir/**' "$fromdir/" "$chkdir/"
+
+checkit "$RSYNC -av --files-from='$scratchdir/filelist' '$scratchdir' '$todir/'" "$chkdir" "$todir"
+
+# The script would have aborted on error, so getting here means we've won.
+exit 0