summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-05-06 15:44:01 +0000
committerJim Meyering <jim@meyering.net>2006-05-06 15:44:01 +0000
commitb68ddecba7e59ce6a25f90b8f9d5da401db345f1 (patch)
treeb0a1fad00093875b5d998039c1364d8ce1ee6733
parent439be6d61305e16447729652d9d264af22e2ac76 (diff)
downloadcoreutils-b68ddecba7e59ce6a25f90b8f9d5da401db345f1.tar.xz
Expand to test inode from readdir case.
-rwxr-xr-xtests/ls/inode21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/ls/inode b/tests/ls/inode
index 934f7cf54..efaa02e1d 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -24,6 +24,8 @@ fi
fail=0
+# When listed explicitly:
+
set x `ls -Ci f slink`; shift
test $# = 4 || fail=1
# The inode numbers should differ.
@@ -36,7 +38,7 @@ test "$1" = "$3" || fail=1
set x `ls -CHi f slink`; shift
test $# = 4 || fail=1
-# With -H, they must be the same, too.
+# With -H, they must be the same, too, from the command line.
# 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
@@ -44,4 +46,21 @@ test $# = 4 || fail=1
# implements the BSD semantics.
test "$1" = "$3" || fail=1
+# When listed from a directory:
+
+set x `ls -Ci`; shift
+test $# = 4 || fail=1
+# The inode numbers should differ.
+test "$1" != "$3" || fail=1
+
+set x `ls -CLi`; shift
+test $# = 4 || fail=1
+# With -L, they must be the same.
+test "$1" = "$3" || fail=1
+
+set x `ls -CHi`; shift
+test $# = 4 || fail=1
+# With -H, they must be different from inside a directory.
+test "$1" != "$3" || fail=1
+
(exit $fail); exit $fail