Got rid of the NVAL*() defines.
[rsync/rsync.git] / testsuite / merge.test
CommitLineData
12865a97
WD
1#! /bin/sh
2
3# Copyright (C) 2004 by Wayne Davison <wayned@samba.org>
4
5# This program is distributable under the terms of the GNU GPL (see
6# COPYING).
7
8# Make sure we can merge files from multiple directories into one.
9
7892e5ac 10. "$suitedir/rsync.fns"
12865a97 11
12865a97
WD
12# Build some files/dirs/links to copy
13
10813368
WD
14# Use local dirnames to better exercise the arg-parsing code.
15cd "$tmpdir"
16
17mkdir from1 from2 from3
18mkdir from2/sub1 from3/sub1
19mkdir from3/sub2 from1/dir-and-not-dir
20mkdir -p chk/sub1 chk/sub2 chk/dir-and-not-dir
21echo "one" >from1/one
22cp -p from1/one from2/one
23cp -p from1/one from3/one
24echo "two" >from1/two
25echo "three" >from2/three
26echo "four" >from3/four
27echo "five" >from1/five
28echo "six" >from3/six
29echo "sub1" >from2/sub1/uno
30cp -p from2/sub1/uno from3/sub1/uno
31echo "sub2" >from3/sub1/dos
32echo "sub3" >from2/sub1/tres
33echo "subby" >from3/sub2/subby
34echo "extra" >from1/dir-and-not-dir/inside
35echo "not-dir" >from3/dir-and-not-dir
36
37cp -p from1/one from1/two from2/three from3/four from1/five from3/six chk
38cp -p from1/dir-and-not-dir/inside chk/dir-and-not-dir
39cp -p from2/sub1/uno from3/sub1/dos from2/sub1/tres chk/sub1
40cp -p from3/sub2/subby chk/sub2
12865a97 41
284d628a 42# Get rid of any directory-time differences
10813368
WD
43$RSYNC -av --existing -f 'exclude,! */' from1/ from2/
44$RSYNC -av --existing -f 'exclude,! */' from2/ from3/
45$RSYNC -av --existing -f 'exclude,! */' from1/ chk/
46$RSYNC -av --existing -f 'exclude,! */' from3/ chk/
12865a97 47
10813368
WD
48# TODO: fix inc-recurse unduplications of directory contents!
49checkit "$RSYNC -avv --no-ir from1/ from2/ from3/ to/" chk to
12865a97 50
05118158 51# The script would have aborted on error, so getting here means we've won.
12865a97 52exit 0