summaryrefslogtreecommitdiff
path: root/tests/touch/relative
diff options
context:
space:
mode:
Diffstat (limited to 'tests/touch/relative')
-rwxr-xr-xtests/touch/relative14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/touch/relative b/tests/touch/relative
index 925c83473..02dfe9c6c 100755
--- a/tests/touch/relative
+++ b/tests/touch/relative
@@ -2,7 +2,7 @@
# Demonstrate using a combination of --reference and --date to
# set the time of a file back by an arbitrary amount.
-# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 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,16 +22,9 @@ if test "$VERBOSE" = yes; then
touch --version
fi
-. $srcdir/../envvar-check
-
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
+. $srcdir/../test-lib.sh
framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure=1
if test $framework_failure = 1; then
@@ -51,7 +44,6 @@ cat <<\EOF > exp || fail=1
2004-01-11
EOF
-cmp out exp || fail=1
-test $fail = 1 && diff out exp 2> /dev/null
+compare out exp || fail=1
(exit $fail); exit $fail