From c8707dcc2f7d33d664e636c3b69bdc8bc8098327 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 19 Dec 1999 10:21:51 +0000 Subject: . --- tests/ls/Makefile.in | 2 +- tests/ls/symlink-slash | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 tests/ls/symlink-slash (limited to 'tests/ls') diff --git a/tests/ls/Makefile.in b/tests/ls/Makefile.in index dc84407cd..8738c24b5 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 000000000..ae12b091b --- /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 -- cgit v1.2.3-70-g09d2