summaryrefslogtreecommitdiff
path: root/testsuite/delete.test
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-20 01:04:27 +0000
committerWayne Davison <wayned@samba.org>2005-02-20 01:04:27 +0000
commit0254bd46ec48e420b7d0a4a330edc2683fd8c2cb (patch)
tree076efc67a1971aab4125fe9f1411430ed8740506 /testsuite/delete.test
parent8b806ed3477007bf6ee96628abe2b28d1b2cda29 (diff)
downloadrsync-0254bd46ec48e420b7d0a4a330edc2683fd8c2cb.tar.gz
Test --remove-sent-files.
Diffstat (limited to 'testsuite/delete.test')
-rw-r--r--testsuite/delete.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/delete.test b/testsuite/delete.test
new file mode 100644
index 00000000..99791d5a
--- /dev/null
+++ b/testsuite/delete.test
@@ -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