summaryrefslogtreecommitdiff
path: root/testsuite/delay-updates.test
blob: 3b6226b4b28b9adf4b3a426947104403b48e7aac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# Test rsync --delay-updates

. "$suitedir/rsync.fns"

mkdir "$fromdir"

echo 1 > "$fromdir/foo"

checkit "$RSYNC -aiv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"

mkdir "$todir/.~tmp~"
echo 2 > "$todir/.~tmp~/foo"
touch -r .. "$todir/.~tmp~/foo" "$todir/foo"
echo 3 > "$fromdir/foo"

checkit "$RSYNC -aiv --delay-updates \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"

# The script would have aborted on error, so getting here means we've won.
exit 0