aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/symlink-ignore.test
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-12-14 02:01:46 +0000
committerMartin Pool <mbp@samba.org>2001-12-14 02:01:46 +0000
commit3cd2af41e48710dbb27af4ebcbe3ca6e7ea7b2de (patch)
tree52c38bbc8272f9b4627d42342fe16a4448d63fae /testsuite/symlink-ignore.test
parentb214eda4f077515f328802cd8f6b0b48aaff661c (diff)
downloadandroid_external_rsync-3cd2af41e48710dbb27af4ebcbe3ca6e7ea7b2de.tar.gz
android_external_rsync-3cd2af41e48710dbb27af4ebcbe3ca6e7ea7b2de.tar.bz2
android_external_rsync-3cd2af41e48710dbb27af4ebcbe3ca6e7ea7b2de.zip
Add a test that when none of -l, -L, -a are specified symlinks are not
copied at all.
Diffstat (limited to 'testsuite/symlink-ignore.test')
-rw-r--r--testsuite/symlink-ignore.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/symlink-ignore.test b/testsuite/symlink-ignore.test
new file mode 100644
index 00000000..549e74c1
--- /dev/null
+++ b/testsuite/symlink-ignore.test
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
+
+# This program is distributable under the terms of the GNU GPL (see
+# COPYING).
+
+# Test rsync's somewhat over-featured symlink control: the default
+# behaviour is that symlinks should not be copied at all.
+
+. $srcdir/testsuite/rsync.fns
+
+build_symlinks
+
+# Copy recursively, but without -l or -L or -a, and all the symlinks
+# should be missing.
+"$rsync_bin" -r "$fromdir/" "$todir" || test_fail "rsync returned $?"
+
+[ -e $todir/referent ] || test_fail "referent was not copied"
+[ -e $todir/from ] && test_fail "extra level of directories"
+[ -e $todir/dangling ] && test_fail "dangling symlink was copied"
+[ -e $todir/relative ] && test_fail "relative symlink was copied"
+[ -e $todir/absolute ] && test_fail "absolute symlink was copied"
+
+true # cool