Split the 'longdir' test into its own script, and make it work without
[rsync/rsync.git] / testsuite / hands.test
CommitLineData
068a7221
MP
1#!/bin/sh
2
3# Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
e8ca5901 4# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
068a7221
MP
5#
6# This program is distributable under the terms of the GNU GPL (see COPYING)
068a7221 7
3a4c683f
MP
8. "$suitedir/rsync.fns"
9
10hands_setup
068a7221 11
068a7221
MP
12# Main script starts here
13
14runtest "basic operation" 'checkit "$RSYNC -av ${FROM}/ ${TO}" ${FROM}/ ${TO}'
15
e8ca5901 16ln ${FROM}/filelist ${FROM}/dir
068a7221
MP
17runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
18
19rm ${TO}/${F1}
20runtest "one file" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
21
22echo "extra line" >> ${TO}/${F1}
23runtest "extra data" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
24
25cp ${FROM}/${F1} ${TO}/ThisShouldGo
26runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
27
068a7221
MP
28rm -rf ${TO}
29mkdir -p ${FROM}2/dir/subdir
30cp -a ${FROM}/dir/subdir/subsubdir ${FROM}2/dir/subdir
3fedd74b 31cp ${FROM}/dir/* ${FROM}2/dir || :
068a7221
MP
32runtest "excludes" 'checkit "$RSYNC -vv -Hlrt --delete --include /dir/ --include /dir/\* --include /dir/\*/subsubdir --include /dir/\*/subsubdir/\*\* --exclude \*\* ${FROM}/dir ${TO}" ${FROM}2/ ${TO}'
33rm -r ${FROM}2
34
35checkforlogs ${LOG}.?