summaryrefslogtreecommitdiff
path: root/tests/ls/recursive
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/recursive
parent7455bf9432c0ae3664803695ddcb27613d20ca8e (diff)
downloadcoreutils-28f1844cefb2decc05858fdf8cc62a9ef63a9a31.tar.xz
Convert tests/ls/, too.
Diffstat (limited to 'tests/ls/recursive')
-rwxr-xr-xtests/ls/recursive28
1 files changed, 6 insertions, 22 deletions
diff --git a/tests/ls/recursive b/tests/ls/recursive
index 6e4cedd88..8aff3ed7e 100755
--- a/tests/ls/recursive
+++ b/tests/ls/recursive
@@ -2,7 +2,7 @@
# 4.1.1 and 4.1.2 had a bug whereby some recursive listings
# didn't include a blank line between per-directory groups of files.
-# Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -22,24 +22,10 @@ if test "$VERBOSE" = yes; then
ls --version
fi
-. $srcdir/../envvar-check
+. $srcdir/../test-lib.sh
-pwd=`pwd`
-tmp=recursive.$$
-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
-
-mkdir x y a b c a/1 a/2 a/3 || framework_failure=1
-touch f a/1/I a/1/II || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+mkdir x y a b c a/1 a/2 a/3 || framework_failure
+touch f a/1/I a/1/II || framework_failure
fail=0
@@ -64,8 +50,7 @@ b:
c:
EOF
-cmp out exp || fail=1
-test $fail = 1 && diff out exp 2> /dev/null
+compare out exp || fail=1
rm -rf out exp
ls -R1 x y f > out || fail=1
@@ -77,7 +62,6 @@ x:
y:
EOF
-cmp out exp || fail=1
-test $fail = 1 && diff out exp 2> /dev/null
+compare out exp || fail=1
(exit $fail); exit $fail