diff options
Diffstat (limited to 'tests/ls')
-rwxr-xr-x | tests/ls/inode | 12 | ||||
-rwxr-xr-x | tests/ls/nameless-uid | 2 | ||||
-rwxr-xr-x | tests/ls/stat-dtype | 2 | ||||
-rwxr-xr-x | tests/ls/stat-vs-dirent | 12 | ||||
-rwxr-xr-x | tests/ls/symlink-slash | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/tests/ls/inode b/tests/ls/inode index b5c881e27..8bf5ba153 100755 --- a/tests/ls/inode +++ b/tests/ls/inode @@ -25,17 +25,17 @@ ln -s f slink || framework_failure_ # When listed explicitly: -set x `ls -Ci f slink`; shift +set x $(ls -Ci f slink); shift test $# = 4 || fail=1 # The inode numbers should differ. test "$1" != "$3" || fail=1 -set x `ls -CLi f slink`; shift +set x $(ls -CLi f slink); shift test $# = 4 || fail=1 # With -L, they must be the same. test "$1" = "$3" || fail=1 -set x `ls -CHi f slink`; shift +set x $(ls -CHi f slink); shift test $# = 4 || fail=1 # With -H, they must be the same, too, from the command line. # Note that POSIX says -H must make ls dereference only @@ -47,17 +47,17 @@ test "$1" = "$3" || fail=1 # When listed from a directory: -set x `ls -Ci`; shift +set x $(ls -Ci); shift test $# = 4 || fail=1 # The inode numbers should differ. test "$1" != "$3" || fail=1 -set x `ls -CLi`; shift +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 +set x $(ls -CHi); shift test $# = 4 || fail=1 # With -H, they must be different from inside a directory. test "$1" != "$3" || fail=1 diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid index 6cd186873..1c8c4718f 100755 --- a/tests/ls/nameless-uid +++ b/tests/ls/nameless-uid @@ -34,7 +34,7 @@ touch f || framework_failure_ chown $nameless_uid f || framework_failure_ -set -- `ls -o f` || fail=1 +set -- $(ls -o f) || fail=1 test $3 = $nameless_uid || fail=1 Exit $fail diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index 733ce38a0..b84d5d51a 100755 --- a/tests/ls/stat-dtype +++ b/tests/ls/stat-dtype @@ -29,7 +29,7 @@ print_ver_ ls # but if ls's d_type code is buggy then "ls -p" might be buggy too. mkdir -p c/d || framework_failure_ chmod a-x c || framework_failure_ -if test "X`ls -p c 2>&1`" != Xd/; then +if test "X$(ls -p c 2>&1)" != Xd/; then skip_ "'.' is not on a suitable file system for this test" fi diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent index 60d96220a..1dd6e6621 100755 --- a/tests/ls/stat-vs-dirent +++ b/tests/ls/stat-vs-dirent @@ -20,20 +20,20 @@ print_ver_ ls -root_dev_ino=`stat --format=%d-%i /` -t=`pwd` +root_dev_ino=$(stat --format=%d-%i /) +t=$(pwd) while :; do ls -i1 "$t" > tmp if test $? = 0; then # Extract the inode number from the first line of output from ls -i1. # This value comes from dirent.d_ino, on systems with d_ino support. - d_ino=`sed -n '1s/^ *\([0-9][0-9]*\) .*/\1/p;q' tmp` + d_ino=$(sed -n '1s/^ *\([0-9][0-9]*\) .*/\1/p;q' tmp) # Extract the name of the corresponding directory entry. - file=`sed -n '1s/^ *[0-9][0-9]* *//p;q' tmp` + file=$(sed -n '1s/^ *[0-9][0-9]* *//p;q' tmp) # Get its inode number (stat.st_ino) via stat(1)'s call to lstat. - st_ino=`stat --format=%i "$t/$file"` + st_ino=$(stat --format=%i "$t/$file") # Make sure that they are the same. # We know from experience that there may be mismatches on some @@ -53,7 +53,7 @@ while :; do fi t=$(cd "$t/.."; pwd) - dev_ino=`stat --format=%d-%i "$t"` + dev_ino=$(stat --format=%d-%i "$t") test $dev_ino = $root_dev_ino && break done diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash index 4bbf6f79c..28c7d32b2 100755 --- a/tests/ls/symlink-slash +++ b/tests/ls/symlink-slash @@ -22,7 +22,7 @@ print_ver_ ls mkdir dir || framework_failure_ ln -s dir symlink || framework_failure_ -set `ls -l symlink/` +set $(ls -l symlink/) # Prior to fileutils-4.0k, the following would have output '... symlink -> dir'. test "$*" = 'total 0' && : || fail=1 |