summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-08-16 15:50:00 +0200
committerJim Meyering <jim@meyering.net>2007-08-16 15:50:00 +0200
commite069d38d35b8f50897f6bdc29cc022cd5efa9749 (patch)
treeb15d86fb647aaaeb2207e2b2c4483cc4f4558cc0 /tests
parent535a9fe5122808161398345f5ab317bd1ef6bde8 (diff)
downloadcoreutils-e069d38d35b8f50897f6bdc29cc022cd5efa9749.tar.xz
* tests/ls/time-1: Include sample-test boilerplate code.
Remove the then-unnecessary, hard-coded envvar "unset" commands.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ls/time-122
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/ls/time-1 b/tests/ls/time-1
index 45be86e16..9456411bd 100755
--- a/tests/ls/time-1
+++ b/tests/ls/time-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test some of ls's sorting options.
-# Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation,
+# Copyright (C) 1998, 1999, 2000, 2001, 2004, 2007 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
@@ -22,15 +22,27 @@ if test "$VERBOSE" = yes; then
ls --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
+
+framework_failure=0
+mkdir -p $tmp || framework_failure=1
+cd $tmp || framework_failure=1
+
+if test $framework_failure = 1; then
+ echo "$0: failure in testing framework" 1>&2
+ (exit 1); exit 1
+fi
+
# Avoid any possible glitches due to daylight-saving changes near the
# time stamps used during the test.
TZ=UTC0
export TZ
-# Avoid glitches due to the environment specifying `ls' styles.
-unset QUOTING_STYLE
-unset TIME_STYLE
-
tmp=t-ls.$$
framework_failure=0