summaryrefslogtreecommitdiff
path: root/tests/ls/inode
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-01-18 18:06:38 +0000
committerJim Meyering <jim@meyering.net>2003-01-18 18:06:38 +0000
commitbe33a434cbcc27cc94d6bf311d84dd941a8b1c0f (patch)
treedbb4d7f29165fa686cd0d2cf1a2314bd71227cc9 /tests/ls/inode
parentba2b351bbf58cbc6ae9ccc880623ffce16f65c05 (diff)
downloadcoreutils-be33a434cbcc27cc94d6bf311d84dd941a8b1c0f.tar.xz
reflect change in how ls -H works
Diffstat (limited to 'tests/ls/inode')
-rwxr-xr-xtests/ls/inode11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/ls/inode b/tests/ls/inode
index f4bf38460..934f7cf54 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -27,7 +27,7 @@ fail=0
set x `ls -Ci f slink`; shift
test $# = 4 || fail=1
# The inode numbers should differ.
-test "$1" = "$3" && fail=1
+test "$1" != "$3" || fail=1
set x `ls -CLi f slink`; shift
test $# = 4 || fail=1
@@ -36,7 +36,12 @@ test "$1" = "$3" || fail=1
set x `ls -CHi f slink`; shift
test $# = 4 || fail=1
-# With -H, they must differ.
-test "$1" = "$3" && fail=1
+# With -H, they must be the same, too.
+# Note that POSIX says -H must make ls dereference only
+# symlinks (specified on the command line) to directories,
+# but the historical BSD meaning of -H is to dereference
+# any symlink given on the command line. For compatibility GNU ls
+# implements the BSD semantics.
+test "$1" = "$3" || fail=1
(exit $fail); exit $fail