diff options
Diffstat (limited to 'tests/cp/cp-parents')
-rwxr-xr-x | tests/cp/cp-parents | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents index 373e60776..6c123d225 100755 --- a/tests/cp/cp-parents +++ b/tests/cp/cp-parents @@ -2,7 +2,8 @@ # cp -R --parents dir-specified-with-trailing-slash/ other-dir # would get a failed assertion. -# Copyright (C) 2000, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2000, 2002, 2004, 2005, 2006, 2007 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -48,6 +49,7 @@ cd $tmp || framework_failure=1 mkdir foo bar || framework_failure=1 mkdir -p a/b/c d e || framework_failure=1 +touch f || framework_failure=1 if test $framework_failure = 1; then echo 'failure in testing framework' @@ -65,6 +67,11 @@ cp -R --parents foo/ bar || fail=1 cp --verbose -a --parents a/b/c d > /dev/null 2>&1 || fail=1 test -d d/a/b/c || fail=1 +# With 6.7 and earlier, cp --parents f/g d would mistakenly create a +# directory d/f, even though f is a regular file. +cp --parents f/g d 2>/dev/null && fail=1 +test -d d/f && fail=1 + # Check that re_protect works. chmod go=w d/a cp -a --parents d/a/b/c e || fail=1 |