]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* tests/ls/time-1: Include sample-test boilerplate code.
authorJim Meyering <jim@meyering.net>
Thu, 16 Aug 2007 13:50:00 +0000 (15:50 +0200)
committerJim Meyering <jim@meyering.net>
Thu, 16 Aug 2007 13:50:00 +0000 (15:50 +0200)
Remove the then-unnecessary, hard-coded envvar "unset" commands.

ChangeLog
tests/ls/time-1

index 648f44ded8cfa4d12ca9c6285f6c45ee5d474c5e..f9ebff1dd71fab09d19208cf0c2790c59aa72bb7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-16  Jim Meyering  <jim@meyering.net>
+
+       * tests/ls/time-1: Include sample-test boilerplate code.
+       Remove the then-unnecessary, hard-coded envvar "unset" commands.
+
 2007-08-15  Jim Meyering  <jim@meyering.net>
 
        od --skip (-j) works even on files in /proc, when the kernel lies
index 45be86e169225c067a90d1324d748b4d26a7ccee..9456411bdf643a313af8607a3f87bcc7d2bb91fa 100755 (executable)
@@ -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