diff options
Diffstat (limited to 'tests/ls/follow-slink')
-rwxr-xr-x | tests/ls/follow-slink | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink index 2165c62e6..a7efadb17 100755 --- a/tests/ls/follow-slink +++ b/tests/ls/follow-slink @@ -1,7 +1,7 @@ #!/bin/sh # make sure ls -L always follows symlinks -# Copyright (C) 2000, 2002, 2004, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,30 +21,18 @@ if test "$VERBOSE" = yes; then ls --version fi -pwd=`pwd` -tmp=follow-sl.$$ -trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 -trap '(exit $?); exit' 1 2 13 15 - -framework_failure=0 -mkdir $tmp || framework_failure=1 -cd $tmp || framework_failure=1 +. $srcdir/../test-lib.sh # Isolate output files from directory being listed -mkdir dir dir/sub dir1 || framework_failure=1 -cd dir || framework_failure=1 -ln -s link link || framework_failure=1 -ln -s ../../dir1 sub/link-to-dir || framework_failure=1 +mkdir dir dir/sub dir1 || framework_failure +cd dir || framework_failure +ln -s link link || framework_failure +ln -s ../../dir1 sub/link-to-dir || framework_failure # Make sure the symlink was created. # `ln -s link link' succeeds, but creates no file on # systems running some DJGPP-2.03 libc. -ls -F link > /dev/null || framework_failure=1 - -if test $framework_failure = 1; then - echo 'failure in testing framework' - (exit 1); exit 1 -fi +ls -F link > /dev/null || framework_failure fail=0 @@ -72,13 +60,7 @@ link-to-dir/ sub/link-to-dir: EOF -cmp out-L exp-L || { - fail=1 - diff out-L exp-L -} -cmp out-FLR-sub exp-FLR-sub || { - fail=1 - diff out-FLR-sub exp-FLR-sub -} +compare out-L exp-L || fail=1 +compare out-FLR-sub exp-FLR-sub || fail=1 (exit $fail); exit $fail |