summaryrefslogtreecommitdiff
path: root/tests/ls/symlink-slash
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-08 10:09:19 +0200
committerJim Meyering <jim@meyering.net>2007-09-15 08:40:38 +0200
commit28f1844cefb2decc05858fdf8cc62a9ef63a9a31 (patch)
tree1ba8d121abd2b4bcf259521ce627d1d89d27cefe /tests/ls/symlink-slash
parent7455bf9432c0ae3664803695ddcb27613d20ca8e (diff)
downloadcoreutils-28f1844cefb2decc05858fdf8cc62a9ef63a9a31.tar.xz
Convert tests/ls/, too.
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