summaryrefslogtreecommitdiff
path: root/tests/cp/cp-parents
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-11-05 15:02:32 +0000
committerJim Meyering <jim@meyering.net>2000-11-05 15:02:32 +0000
commitf3a6e69b4e1aa2971a2f9ab2518068decf5db7e5 (patch)
tree3a3b5b8940762cb0278470ce6f0d5e259e5d9314 /tests/cp/cp-parents
parent6d722e99e2ec3a3d9325ea815be20a09ecaa0381 (diff)
downloadcoreutils-f3a6e69b4e1aa2971a2f9ab2518068decf5db7e5.tar.xz
Add tests for the above fix.
Diffstat (limited to 'tests/cp/cp-parents')
-rwxr-xr-xtests/cp/cp-parents7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index 313ead5db..b62bda3b7 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -20,7 +20,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 e || framework_failure=1
+mkdir -p a/b/c d e e-dir || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
@@ -45,4 +45,9 @@ p=`ls -ld e/d|sed 's/ .*//'`; case $p in drwxr-xr-x);; *) fail=1;; esac
p=`ls -ld e/d/a|sed 's/ .*//'`; case $p in drwx-w--w-);; *) fail=1;; esac
p=`ls -ld e/d/a/b/c|sed 's/ .*//'`; case $p in drwxr-xr-x);; *) fail=1;; esac
+# Make sure `mkdir -p existing-dir' succeeds and
+# that `mkdir existing-dir' fails.
+mkdir -p e-dir || fail=1
+mkdir e-dir > /dev/null 2>&1 && fail=1
+
(exit $fail); exit