summaryrefslogtreecommitdiff
path: root/tests/ls/symlink-slash
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ls/symlink-slash')
-rwxr-xr-xtests/ls/symlink-slash22
1 files changed, 4 insertions, 18 deletions
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash
index 23566e35d..8deba0511 100755
--- a/tests/ls/symlink-slash
+++ b/tests/ls/symlink-slash
@@ -1,7 +1,7 @@
#!/bin/sh
# Do dereference a symlink arg if its name is written with a trailing slash.
-# Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2004, 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,22 +21,11 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../envvar-check
. $srcdir/../lang-default
+. $srcdir/../test-lib.sh
-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
+mkdir dir || framework_failure
+ln -s dir symlink || framework_failure
fail=0
set `ls -l symlink/`
@@ -44,7 +33,4 @@ 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