summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-06-22 03:38:08 +0000
committerJim Meyering <jim@meyering.net>1997-06-22 03:38:08 +0000
commit08f074fb34806ffc180eb12d16cc3609fcbca445 (patch)
treea222667e400b7e4730fc6d1c913129b7765dab3c /tests/cp
parent2f91f08a7980fcd4d9719a65463b001088a7b085 (diff)
downloadcoreutils-08f074fb34806ffc180eb12d16cc3609fcbca445.tar.xz
*** empty log message ***
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/no-deref-slink20
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