aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-01-12 15:32:14 -0600
committerRob Landley <rob@landley.net>2019-01-12 15:32:14 -0600
commitc68fa66380ab45957acbfb5dc3b498bb19fe880d (patch)
treeade183008e77dc295563223b018de09442aaa61a /tests
parentbf76b49e295bfa945e79666371e3dd127bc82708 (diff)
downloadtoybox-c68fa66380ab45957acbfb5dc3b498bb19fe880d.tar.gz
Fix cp permissions when copying symlink contents, and add test.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/cp.test b/tests/cp.test
index 2b89e2f2..a720d1f5 100755
--- a/tests/cp.test
+++ b/tests/cp.test
@@ -89,6 +89,13 @@ testing "-r dir1/* dir2" \
"cp -r one/* dir2 && diff -r one dir2 && echo yes" "yes\n" "" ""
rm -rf one dir dir2
+touch walrus
+chmod 644 walrus
+ln -s walrus woot
+
+testing "symlink dest permissions" "cp woot carpenter && stat -c %A carpenter" \
+ "-rw-r--r--\n" "" ""
+
# cp -r ../source destdir
# cp -r one/two/three missing
# cp -r one/two/three two