3 # Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
5 # This program is distributable under the terms of the GNU GPL (see COPYING)
7 # This is a simple test script that tests a few rsync
8 # features to make sure I haven't broken them before a release.
12 . "$suitedir/rsync.fns"
18 # skip it if we're under debian-test
19 if test -n "${Debian}" ; then return 0 ; fi
21 if [ -f $1 -a -s $1 ] ; then
22 echo "Failures have occurred. $1 follows:" >&2
27 echo "Tests Completed Successfully :-)"
31 # Main script starts here
33 runtest "basic operation" 'checkit "$RSYNC -av ${FROM}/ ${TO}" ${FROM}/ ${TO}'
35 ln ${FROM}/pslist ${FROM}/dir
36 runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
39 runtest "one file" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
41 echo "extra line" >> ${TO}/${F1}
42 runtest "extra data" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
44 cp ${FROM}/${F1} ${TO}/ThisShouldGo
45 runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
47 LONGDIR=${FROM}/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job
50 ls -la / > ${LONGDIR}/2
51 runtest "long paths" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
54 mkdir -p ${FROM}2/dir/subdir
55 cp -a ${FROM}/dir/subdir/subsubdir ${FROM}2/dir/subdir
56 cp ${FROM}/dir/* ${FROM}2/dir || :
57 runtest "excludes" 'checkit "$RSYNC -vv -Hlrt --delete --include /dir/ --include /dir/\* --include /dir/\*/subsubdir --include /dir/\*/subsubdir/\*\* --exclude \*\* ${FROM}/dir ${TO}" ${FROM}2/ ${TO}'