Test --remove-sent-files.
authorWayne Davison <wayned@samba.org>
Sun, 20 Feb 2005 01:04:27 +0000 (01:04 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 20 Feb 2005 01:04:27 +0000 (01:04 +0000)
testsuite/delete.test [new file with mode: 0644]

diff --git a/testsuite/delete.test b/testsuite/delete.test
new file mode 100644 (file)
index 0000000..99791d5
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+# Copyright (C) 2005 by Wayne Davison <wayned@samba.org>
+
+# This program is distributable under the terms of the GNU GPL see
+# COPYING).
+
+# Test rsync handling of various delete directives.  
+
+. "$suitedir/rsync.fns"
+
+hands_setup
+
+makepath "$chkdir"
+
+# Create two chk dirs, one with a copy of the source files, and one with
+# what we expect to be left behind by the copy using --remove-sent-files.
+$RSYNC -av "$fromdir/" "$chkdir/copy/"
+$RSYNC -av -f 'exclude,! */' "$fromdir/" "$chkdir/empty/"
+
+checkit "$RSYNC -avv --remove-sent-files \
+    \"$fromdir/\" \"$todir/\"" "$chkdir/copy" "$todir"
+
+diff -r "$chkdir/empty" "$fromdir"
+
+# The script would have aborted on error, so getting here means we've won.
+exit 0