summaryrefslogtreecommitdiff
path: root/tests/chmod/thru-dangling
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-07 10:37:08 +0200
committerJim Meyering <jim@meyering.net>2007-09-07 10:45:22 +0200
commit500eccdbe4d55b0cbf48cf264aa4232abd7c23df (patch)
tree5a08a351c3b6615f77d39c9946e99d7583106215 /tests/chmod/thru-dangling
parente70487cda746cc0800a02003c93f74621640e201 (diff)
downloadcoreutils-500eccdbe4d55b0cbf48cf264aa4232abd7c23df.tar.xz
chmod: don't ignore a dangling symlink
* NEWS: Mention the bug fix. * src/chmod.c (process_file): Handle the case of FTS_SLNONE, i.e., give a diagnostic saying we cannot operate on such a file. * tests/chmod/thru-dangling: Compare new stderr output with expected.
Diffstat (limited to 'tests/chmod/thru-dangling')
-rwxr-xr-xtests/chmod/thru-dangling6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling
index d972a8abf..7a82db83d 100755
--- a/tests/chmod/thru-dangling
+++ b/tests/chmod/thru-dangling
@@ -40,6 +40,10 @@ fi
fail=0
# This operation cannot succeed since the symbolic link dangles.
-chmod 644 dangle && fail=1
+chmod 644 dangle 2> out && fail=1
+
+echo "chmod: cannot operate on dangling symlink \`dangle'" > exp
+cmp out exp || fail=1
+test $fail = 1 && diff out exp 2> /dev/null
(exit $fail); exit $fail