]>
git.cameronkatri.com Git - apple_cmds.git/blob - file_cmds/tests/cp.sh
3 # Regression test for 69452380
4 function regression_69452380
()
6 echo "Verifying that cp -p preserves symlink's attributes, rather than the attributes of the symlink's target."
7 test_dir
=`mktemp -d /tmp/69452380_src_XXXX`
8 touch ${test_dir}/target
9 mkdir ${test_dir}/link_dir
10 # Create symlink (must use relative path for the failure to occur)
11 cd ${test_dir}/link_dir
13 # cp (with attribute preservation) the test dir containing both the
14 # target and the link (in a subdirectory) to a new dir.
15 # Prior to 69452380, this failed because we followed the symlink to
16 # try and preserve attributes for a non-existing file, instead of
17 # preserving the attributes of the symlink itself.
18 cp -R -P -p ${test_dir} /tmp
/69452380_tgt_
${RANDOM}