*** empty log message ***
[coreutils.git] / tests / ls / follow-slink
blob05d52271810bbbbebfe02134db6afeef9f63ef78
1 #!/bin/sh
2 # make sure ls -L always follows symlinks
4 if test "$VERBOSE" = yes; then
5 set -x
6 ls --version
7 fi
9 pwd=`pwd`
10 tmp=follow-sl.$$
11 trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
12 trap '(exit $?); exit' 1 2 13 15
14 framework_failure=0
15 mkdir $tmp || framework_failure=1
16 cd $tmp || framework_failure=1
17 ln -s link link || framework_failure=1
19 # Make sure the symlink was created.
20 # `ln -s link link' succeeds, but creates no file on
21 # systems running some DJGPP-2.03 libc.
22 ls -F link > /dev/null || framework_failure=1
24 if test $framework_failure = 1; then
25 echo 'failure in testing framework'
26 (exit 1); exit
29 fail=0
31 ls -L link 2> /dev/null && fail=1
33 (exit $fail); exit