summaryrefslogtreecommitdiff
path: root/tests/cp/cp-parents
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-10-29 08:04:17 +0000
committerJim Meyering <jim@meyering.net>2000-10-29 08:04:17 +0000
commitfe62a85366f9be045e951da8011bd93afa615e07 (patch)
tree8d4485725027b574d643784509f4422493ba84de /tests/cp/cp-parents
parent4b4c8534e600cc64969a07412d0f7f93569f6b55 (diff)
downloadcoreutils-fe62a85366f9be045e951da8011bd93afa615e07.tar.xz
Add a test.
Diffstat (limited to 'tests/cp/cp-parents')
-rwxr-xr-xtests/cp/cp-parents8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index 183a77a20..bab9c4fbf 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -18,6 +18,7 @@ framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
mkdir foo bar || framework_failure=1
+mkdir -p a/b/c d || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
@@ -30,4 +31,11 @@ fail=0
# with the failed assertion from dirname.c.
cp -R --parents foo/ bar || fail=1
+# Exercise the make_path and re_protect code in cp.c.
+# FIXME: compare verbose output with expected output.
+cp --verbose -a --parents a/b/c d > /dev/null 2>&1 || fail=1
+test -d d/a/b/c || fail=1
+
+# FIXME: add tests to check that re_protect works
+
(exit $fail); exit