summaryrefslogtreecommitdiff
path: root/tests/du/two-args
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-07 15:25:23 +0200
committerJim Meyering <jim@meyering.net>2007-09-15 08:40:38 +0200
commitec2064acc84d9cc6e0bfae04c591974efc449d8a (patch)
treefc20b7c780175d6f428c392ce333199c9b24e79f /tests/du/two-args
parent18b3231bbfdb1fe36c08511bda930588cc836c71 (diff)
downloadcoreutils-ec2064acc84d9cc6e0bfae04c591974efc449d8a.tar.xz
Convert tests/du/*, too.
Diffstat (limited to 'tests/du/two-args')
-rwxr-xr-xtests/du/two-args30
1 files changed, 10 insertions, 20 deletions
diff --git a/tests/du/two-args b/tests/du/two-args
index aa3975e10..a9a3e75b0 100755
--- a/tests/du/two-args
+++ b/tests/du/two-args
@@ -2,7 +2,7 @@
# Make sure `du d/1 d/2' works.
# That command failed with du from fileutils-4.0q.
-# Copyright (C) 2000, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -22,28 +22,18 @@ if test "$VERBOSE" = yes; then
du --version
fi
-pwd=`pwd`
-tmp=du2-$$
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
+. $srcdir/../test-lib.sh
-framework_failure=0
-mkdir $tmp || framework_failure=1
-cd $tmp || framework_failure=1
+t=t
+mkdir -p $t/1 $t/2 || framework_failure
-if test $framework_failure = 1; then
- echo 'failure in testing framework'
- (exit 1); exit 1
-fi
-
-mkdir -p $tmp/1 $tmp/2
-
-test -d $tmp || fail=1
-du $tmp/1 $tmp/2 > /dev/null || fail=1
+fail=0
+test -d $t || fail=1
+du $t/1 $t/2 > /dev/null || fail=1
-# Make sure `du . $tmp' and `du .. $tmp' work.
+# Make sure `du . $t' and `du .. $t' work.
# These would fail prior to fileutils-4.0y.
-du . $tmp > /dev/null || fail=1
-du .. $tmp > /dev/null || fail=1
+du . $t > /dev/null || fail=1
+du .. $t > /dev/null || fail=1
(exit $fail); exit $fail