From: Jim Meyering Date: Sun, 19 Dec 1999 10:21:51 +0000 (+0000) Subject: . X-Git-Tag: FILEUTILS-4_0l~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8707dcc2f7d33d664e636c3b69bdc8bc8098327;p=thirdparty%2Fcoreutils.git . --- diff --git a/tests/ls/Makefile.in b/tests/ls/Makefile.in index dc84407cd9..8738c24b50 100644 --- a/tests/ls/Makefile.in +++ b/tests/ls/Makefile.in @@ -103,7 +103,7 @@ l = @l@ AUTOMAKE_OPTIONS = 1.2 gnits -TESTS = rt-1 time-1 +TESTS = rt-1 time-1 slashed-symlink EXTRA_DIST = $(TESTS) TESTS_ENVIRONMENT = \ top_srcdir=$(top_srcdir) \ diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash new file mode 100755 index 0000000000..ae12b091b9 --- /dev/null +++ b/tests/ls/symlink-slash @@ -0,0 +1,35 @@ +#!/bin/sh +# Do dereference a symlink arg if its name is written with a trailing slash. + +if test "$VERBOSE" = yes; then + set -x + ls --version +fi + +tmp=t-ls.$$ + +framework_failure=0 +mkdir $tmp || framework_failure=1 +cd $tmp || framework_failure=1 + +mkdir dir || framework_failure=1 +ln -s dir symlink || framework_failure=1 + +if test $framework_failure = 1; then + echo 'failure in testing framework' + exit 1 +fi + +LANGUAGE=C; export LANGUAGE +LANG=C; export LANG + +fail=0 +set `ls -l symlink/` + +# Prior to fileutils-4.0k, the following would have output `... symlink -> dir'. +test "$*" = 'total 0' && : || fail=1 + +cd .. +rm -rf $tmp + +exit $fail