diff options
author | Jim Meyering <jim@meyering.net> | 1997-06-22 03:38:08 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-06-22 03:38:08 +0000 |
commit | 08f074fb34806ffc180eb12d16cc3609fcbca445 (patch) | |
tree | a222667e400b7e4730fc6d1c913129b7765dab3c /tests/cp | |
parent | 2f91f08a7980fcd4d9719a65463b001088a7b085 (diff) | |
download | coreutils-08f074fb34806ffc180eb12d16cc3609fcbca445.tar.xz |
*** empty log message ***
Diffstat (limited to 'tests/cp')
-rwxr-xr-x | tests/cp/no-deref-slink | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/cp/no-deref-slink b/tests/cp/no-deref-slink index 8b709ed38..96f2452ad 100755 --- a/tests/cp/no-deref-slink +++ b/tests/cp/no-deref-slink @@ -1,12 +1,22 @@ #!/bin/sh -# This test requires ln -s. +# FIXME: This test requires ln -s. # cp from 3.16 fails this test + rm -rf a b mkdir a b -echo foo > a/foo +msg=bar +echo $msg > a/foo cd b ln -s ../a/foo . cd .. -./cp -d a/foo b -test "`cat a/foo`" = foo && fail=0 || fail=1 -exit $fail + +# It should fail with a message something like this: +# ./cp: `a/foo' and `b/foo' are the same file +./cp -d a/foo b 2>/dev/null + +# Fail this test if the exit status is not 1 +test $? = 1 || exit 1 + +test "`cat a/foo`" = bar || exit 1 + +exit 0 |