summaryrefslogtreecommitdiff
path: root/test/fileutils
diff options
context:
space:
mode:
Diffstat (limited to 'test/fileutils')
-rw-r--r--test/fileutils/test_fileutils.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index f563068eda..2549458fa2 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -325,6 +325,17 @@ class TestFileUtils
assert_equal 'SLdest', File.readlink('tmp/cpr_dest2/symlink')
end if have_symlink?
+ def test_cp_r_symlink_preserve
+ mkdir 'tmp/cross'
+ mkdir 'tmp/cross/a'
+ mkdir 'tmp/cross/b'
+ touch 'tmp/cross/a/f'
+ touch 'tmp/cross/b/f'
+ ln_s '../a/f', 'tmp/cross/b/l'
+ ln_s '../b/f', 'tmp/cross/a/l'
+ cp_r 'tmp/cross', 'tmp/cross2', :preserve => true
+ end if have_symlink?
+
def test_cp_r_pathname
# pathname
touch 'tmp/cprtmp'