summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-04-17 06:08:59 +0000
committerAndrew Tridgell <tridge@samba.org>1998-04-17 06:08:59 +0000
commit5806b30f0faa6ed9ded856a28e75820c48e68658 (patch)
tree4ce470284b90bac29ba9270a46ab87df5520e6ad /test.sh
parent3333ffbd431e6164fe29b096ab67ff0cfda35a56 (diff)
downloadrsync-5806b30f0faa6ed9ded856a28e75820c48e68658.tar.gz
rsync-5806b30f0faa6ed9ded856a28e75820c48e68658.tar.bz2
rsync-5806b30f0faa6ed9ded856a28e75820c48e68658.zip
this is a little test script to test some of rsyncs features
(contributed by Phil Hands)
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh54
1 files changed, 54 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100755
index 00000000..132e073c
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+# This is a simple test script that tests a few rsync
+# features to make sure I haven't broken them before a release. Thanks
+# to Phil Hands for writing this
+
+export PATH=.:$PATH
+TMP=/tmp/rsync-test.$$
+F1=README
+
+mkdir $TMP
+
+pause() {
+ echo ... press enter to continue
+ read
+}
+
+echo "Test 1 basic operation"
+rsync -av testin/ ${TMP}/rsync
+diff -ur testin/ ${TMP}/rsync
+pause
+
+echo "Test 2 - one file"
+rm ${TMP}/rsync/${F1}
+rsync -av testin/ ${TMP}/rsync
+diff -ur testin/ ${TMP}/rsync
+pause
+
+echo "Test 3 - extra data"
+echo "extra line" >> ${TMP}/rsync/${F1}
+rsync -av testin/ ${TMP}/rsync
+diff -ur testin/ ${TMP}/rsync
+pause
+
+echo "Test 4 - --delete"
+cp testin/${F1} ${TMP}/rsync/f1
+rsync --delete -av testin/ ${TMP}/rsync
+diff -ur testin/ ${TMP}/rsync
+pause
+
+echo "Test 5 (uses ssh, so will fail if you don't have it) "
+rm -rf ${TMP}/rsync
+rsync -av -e ssh testin/ localhost:${TMP}/rsync
+diff -ur testin/ ${TMP}/rsync
+pause
+
+echo "Test 6 (uses ssh, so will fail if you don't have it) "
+mv ${TMP}/rsync/${F1} ${TMP}/rsync/f1
+rsync --delete -av -e ssh testin/ localhost:${TMP}/rsync
+diff -ur testin/ ${TMP}/rsync
+pause
+
+rm -rf ${TMP}
+
+echo Tests Completed