Change all relevant occurrences of ``rsync'' and ``$rsync_bin'' to the
[rsync/rsync.git] / testsuite / symlink-ignore.test
... / ...
CommitLineData
1#! /bin/sh
2
3# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
4
5# This program is distributable under the terms of the GNU GPL (see
6# COPYING).
7
8# Test rsync's somewhat over-featured symlink control: the default
9# behaviour is that symlinks should not be copied at all.
10
11. $srcdir/testsuite/rsync.fns
12
13set -x
14
15build_symlinks || test_fail "failed to build symlinks"
16
17# Copy recursively, but without -l or -L or -a, and all the symlinks
18# should be missing.
19$RSYNC -r "$fromdir/" "$todir" || test_fail "$RSYNC returned $?"
20
21[ -f "${todir}/referent" ] || test_fail "referent was not copied"
22[ -d "${todir}/from" ] && test_fail "extra level of directories"
23if is_a_link "${todir}/dangling"
24then
25 test_fail "dangling symlink was copied"
26fi
27
28if is_a_link "${todir}/relative"
29then
30 test_fail "relative symlink was copied"
31fi
32
33if is_a_link "${todir}/absolute"
34then
35 test_fail "absolute symlink was copied"
36fi
37
38exit 0
39# last [] may have failed but if we get here then we've one
40