+cat <<EOT >"$chkfile"
+.f...p..... foo/config1
+>f..t...... foo/config2
+EOT
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 7 failed"
+
+$RSYNC -ivvplrtH --copy-dest=../to "$fromdir/" "$to2dir/" \
+ | tee "$outfile"
+filter_outfile
+cat <<EOT >"$chkfile"
+cd ./
+cd bar/
+cd bar/baz/
+cf bar/baz/rsync
+cd foo/
+cf foo/config1
+cf foo/config2
+hf foo/extra => foo/config1
+cL foo/sym -> ../bar/baz/rsync
+EOT
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 8 failed"
+
+rm -rf "$to2dir"
+$RSYNC -iplrtH --copy-dest=../to "$fromdir/" "$to2dir/" \
+ | tee "$outfile"
+cat <<EOT >"$chkfile"
+hf foo/extra => foo/config1
+EOT
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 9 failed"
+
+rm -rf "$to2dir"
+$RSYNC -vvplrtH --copy-dest="$todir" "$fromdir/" "$to2dir/" \
+ | tee "$outfile"
+filter_outfile
+cat <<EOT >"$chkfile"
+./ is uptodate
+bar/ is uptodate
+bar/baz/ is uptodate
+bar/baz/rsync is uptodate
+foo/ is uptodate
+foo/config1 is uptodate
+foo/config2 is uptodate
+foo/extra => foo/config1
+foo/sym is uptodate
+EOT
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 10 failed"
+
+rm -rf "$to2dir"
+$RSYNC -ivvplrtH --link-dest="$todir" "$fromdir/" "$to2dir/" \
+ | tee "$outfile"
+filter_outfile
+cat <<EOT >"$chkfile"
+cd ./
+cd bar/
+cd bar/baz/
+hf bar/baz/rsync
+cd foo/
+hf foo/config1
+hf foo/config2
+hf foo/extra => foo/config1
+$L foo/sym -> ../bar/baz/rsync
+EOT
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 11 failed"
+
+rm -rf "$to2dir"
+$RSYNC -iplrtH --dry-run --link-dest=../to "$fromdir/" "$to2dir/" \
+ | tee "$outfile"
+cat <<EOT >"$chkfile"
+EOT
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 12 failed"
+
+rm -rf "$to2dir"
+$RSYNC -iplrtH --link-dest=../to "$fromdir/" "$to2dir/" \
+ | tee "$outfile"
+cat <<EOT >"$chkfile"