aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-01-23 19:18:32 -0800
committerRob Landley <rob@landley.net>2020-01-24 05:57:53 -0600
commit51442ce32e99c28fbbd74305e6a8b8e5686293c0 (patch)
treee6d5661e2a10cadcd7cb478fb18f41f97a56b2ab /tests
parent898a25b85144d11b4e31109c35ecc51ea027791d (diff)
downloadtoybox-51442ce32e99c28fbbd74305e6a8b8e5686293c0.tar.gz
cp/mv: add -T.
The kernel script scripts/kconfig/merge_config.sh uses cp -T. (Also sort the options into alphabetical order while adding -T, so that eyeball binary search actually works when trying to find an option! Oddly, they all show in reverse order because there's a bug in the help text generator, but that's a problem for another day...)
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 b665e47e..dfb80ea1 100755
--- a/tests/cp.test
+++ b/tests/cp.test
@@ -113,6 +113,13 @@ testing "duplicated --preserve options" \
"cp --preserve=mode,mode walrus walrus2 2>&1 || echo bad" "" "" ""
rm -rf walrus woot carpenter
+mkdir dir
+echo a > file
+echo b > b
+testing "-T file" "cp -T b file && cat file" "b\n" "" ""
+testing "-T dir" "cp -T b dir 2>/dev/null || echo expected" "expected\n" "" ""
+rm b file
+
# cp -r ../source destdir
# cp -r one/two/three missing
# cp -r one/two/three two