| 1 | #!/bin/sh |
| 2 | |
| 3 | # Copyright (C) 1998,1999 Philip Hands <phil@hands.com> |
| 4 | # Copyright (C) 2001 by Martin Pool <mbp@samba.org> |
| 5 | # |
| 6 | # This program is distributable under the terms of the GNU GPL (see COPYING) |
| 7 | |
| 8 | . "$suitedir/rsync.fns" |
| 9 | |
| 10 | hands_setup |
| 11 | |
| 12 | # Main script starts here |
| 13 | |
| 14 | runtest "basic operation" 'checkit "$RSYNC -av ${FROM}/ ${TO}" ${FROM}/ ${TO}' |
| 15 | |
| 16 | ln ${FROM}/filelist ${FROM}/dir |
| 17 | runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' |
| 18 | |
| 19 | rm ${TO}/${F1} |
| 20 | runtest "one file" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' |
| 21 | |
| 22 | echo "extra line" >> ${TO}/${F1} |
| 23 | runtest "extra data" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' |
| 24 | |
| 25 | cp ${FROM}/${F1} ${TO}/ThisShouldGo |
| 26 | runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' |
| 27 | |
| 28 | 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 |
| 29 | mkdir -p ${LONGDIR} |
| 30 | date > ${LONGDIR}/1 |
| 31 | ls -la / > ${LONGDIR}/2 |
| 32 | runtest "long paths" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}' |
| 33 | |
| 34 | rm -rf ${TO} |
| 35 | mkdir -p ${FROM}2/dir/subdir |
| 36 | cp -a ${FROM}/dir/subdir/subsubdir ${FROM}2/dir/subdir |
| 37 | cp ${FROM}/dir/* ${FROM}2/dir || : |
| 38 | runtest "excludes" 'checkit "$RSYNC -vv -Hlrt --delete --include /dir/ --include /dir/\* --include /dir/\*/subsubdir --include /dir/\*/subsubdir/\*\* --exclude \*\* ${FROM}/dir ${TO}" ${FROM}2/ ${TO}' |
| 39 | rm -r ${FROM}2 |
| 40 | |
| 41 | checkforlogs ${LOG}.? |