From 5806b30f0faa6ed9ded856a28e75820c48e68658 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Apr 1998 06:08:59 +0000 Subject: [PATCH] this is a little test script to test some of rsyncs features (contributed by Phil Hands) --- test.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 test.sh 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 -- 2.34.1