2 # make sure ls -L always follows symlinks
4 if test "$VERBOSE" = yes; then
11 trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
12 trap '(exit $?); exit' 1 2 13 15
15 mkdir $tmp || framework_failure=1
16 cd $tmp || framework_failure=1
18 # Isolate output files from directory being listed
19 mkdir dir || framework_failure=1
20 cd dir || framework_failure=1
21 ln -s link link || framework_failure=1
23 # Make sure the symlink was created.
24 # `ln -s link link' succeeds, but creates no file on
25 # systems running some DJGPP-2.03 libc.
26 ls -F link > /dev/null || framework_failure=1
28 if test $framework_failure = 1; then
29 echo 'failure in testing framework'
35 # When explicitly listing a broken link, the command must fail.
36 ls -L link 2> /dev/null && fail=1
38 # When encountering a broken link implicitly, Solaris 9 and OpenBSD 3.4
39 # list the link, provided no further information about the link needed
40 # to be printed. Since POSIX does not specify one way or the other, we
41 # opt for compatibility (this was broken in 5.3.0 through 5.94).
42 ls -L > ../out || fail=1
51 test $fail = 1 && diff out exp 2> /dev/null
53 (exit $fail); exit $fail