diff options
author | Jim Meyering <jim@meyering.net> | 2002-03-02 17:42:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-03-02 17:42:45 +0000 |
commit | 244554ca1ad97e691ed4d06ed082e77e5f7bfba3 (patch) | |
tree | 325662af556f725c9c3142527e3e58b4151c1d8f /tests/cp/r-vs-symlink | |
parent | 22b03a611029cbb03399af27e370d775cb52c7d2 (diff) | |
download | coreutils-244554ca1ad97e691ed4d06ed082e77e5f7bfba3.tar.xz |
Reflect changed semantics of cp's -r option.
Diffstat (limited to 'tests/cp/r-vs-symlink')
-rwxr-xr-x | tests/cp/r-vs-symlink | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink index 6a4e72d4a..472ee5c78 100755 --- a/tests/cp/r-vs-symlink +++ b/tests/cp/r-vs-symlink @@ -1,5 +1,8 @@ #!/bin/sh # cp -r should not create symlinks. Fixed in fileutils-4.1.5. +# Restored old behavior (whereby cp -r preserves symlinks) in 4.1.6, +# though now such usage evokes a warning: +# cp: `slink': WARNING: using -r to copy symbolic links is not portable if test "$VERBOSE" = yes; then set -x @@ -27,13 +30,14 @@ fi fail=0 -# This must fail. -cp -r no-file junk 2>/dev/null && fail=1 +# This would fail in 4.1.5, not in 4.1.6. +cp -r no-file junk 2>/dev/null || fail=1 -cp -r slink bar || fail=1 +cp -r slink bar 2>/dev/null || fail=1 set x `ls -l bar`; shift; mode=$1 case $mode in - l*) fail=1;; + l*) ;; + *) fail=1;; esac (exit $fail); exit |