Add an "unsafe" symlink to the symlink test case so we can see what happens.
[rsync/rsync.git] / testsuite / rsync.fns
index cf22a97..c321dd3 100644 (file)
@@ -210,5 +210,21 @@ EOF
 }
 
 
+build_symlinks() {
+    fromdir="$scratchdir/from"
+    todir="$scratchdir/to"
+    mkdir "$fromdir"
+    date >"$fromdir/referent"
+    ln -s referent "$fromdir/relative"
+    ln -s "$fromdir/referent" "$fromdir/absolute"
+    ln -s nonexistent "$fromdir/dangling"
+    ln -s "$srcdir/rsync.c" "$fromdir/unsafe"
+}
+
+test_fail() {
+    echo "$@" >&2
+    exit 1
+}
+
 # be reproducible
 umask 077
\ No newline at end of file