diff options
Diffstat (limited to 'tests/chmod/thru-dangling')
-rwxr-xr-x | tests/chmod/thru-dangling | 6 |
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 |