Fixed an "Internal abbrev error" when dealing with an xattr value
[rsync/rsync.git] / testsuite / hands.test
CommitLineData
068a7221
MP
1#!/bin/sh
2
e553d27f
MP
3# Copyright (C) 1998, 1999 by Philip Hands <phil@hands.com>
4# Copyright (C) 2001, 2002 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
8624daa7 14runtest "basic operation" 'checkit "$RSYNC -av \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
068a7221 15
8624daa7
WD
16ln "$fromdir/filelist" "$fromdir/dir"
17runtest "hard links" 'checkit "$RSYNC -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
068a7221 18
8624daa7
WD
19rm "$todir/text"
20runtest "one file" 'checkit "$RSYNC -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
068a7221 21
8624daa7 22echo "extra line" >> "$todir/text"
5c7b1feb 23runtest "extra data" 'checkit "$RSYNC -avH --no-whole-file \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
068a7221 24
8624daa7
WD
25cp "$fromdir/text" "$todir/ThisShouldGo"
26runtest " --delete" 'checkit "$RSYNC --delete -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
68618b88 27
46ad63b7
WD
28cd "$tmpdir"
29rm -rf to from/*dir
30
31# Do the real copy, touch up the parent-dir's time, and then check the copy.
32$RSYNC -av from/* to/
33checkit "$RSYNC -av --exclude='*' from/ to/" "$fromdir" "$todir"
34
05118158 35# The script would have aborted on error, so getting here means we've won.
68618b88 36exit 0