diff options
Diffstat (limited to 'tests/touch')
-rwxr-xr-x | tests/touch/60-seconds | 8 | ||||
-rwxr-xr-x | tests/touch/dangling-symlink | 8 | ||||
-rwxr-xr-x | tests/touch/dir-1 | 8 | ||||
-rwxr-xr-x | tests/touch/empty-file | 8 | ||||
-rwxr-xr-x | tests/touch/fail-diag | 8 | ||||
-rwxr-xr-x | tests/touch/fifo | 8 | ||||
-rwxr-xr-x | tests/touch/no-create-missing | 8 | ||||
-rwxr-xr-x | tests/touch/no-dereference | 8 | ||||
-rwxr-xr-x | tests/touch/no-rights | 8 | ||||
-rwxr-xr-x | tests/touch/not-owner | 8 | ||||
-rwxr-xr-x | tests/touch/now-owned-by-other | 8 | ||||
-rwxr-xr-x | tests/touch/obsolescent | 8 | ||||
-rwxr-xr-x | tests/touch/read-only | 8 | ||||
-rwxr-xr-x | tests/touch/relative | 8 | ||||
-rwxr-xr-x | tests/touch/trailing-slash | 8 |
15 files changed, 30 insertions, 90 deletions
diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds index e06c770f2..e50c25765 100755 --- a/tests/touch/60-seconds +++ b/tests/touch/60-seconds @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version echo 60.000000000 > exp || framework_failure diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink index 6847e460b..55466c439 100755 --- a/tests/touch/dangling-symlink +++ b/tests/touch/dangling-symlink @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version rm -f touch-target t-symlink ln -s touch-target t-symlink diff --git a/tests/touch/dir-1 b/tests/touch/dir-1 index ef1543e26..2d61bb58f 100755 --- a/tests/touch/dir-1 +++ b/tests/touch/dir-1 @@ -2,12 +2,8 @@ # Make sure touch can operate on a directory. # This was broken in the 4.0[efg] test releases. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version touch . || fail=1 Exit $fail diff --git a/tests/touch/empty-file b/tests/touch/empty-file index e279138b2..e93bf0ac0 100755 --- a/tests/touch/empty-file +++ b/tests/touch/empty-file @@ -21,12 +21,8 @@ # fails to work on SunOS 4.1.3 with `most of the recommended patches' when # the empty file is on an NFS-mounted 4.2 volume. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version DEFAULT_SLEEP_SECONDS=2 SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS} diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag index 1b7acbc87..a957a8fdb 100755 --- a/tests/touch/fail-diag +++ b/tests/touch/fail-diag @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version skip_if_root_ d1=no-$$ diff --git a/tests/touch/fifo b/tests/touch/fifo index bf117d9ed..e6743d166 100755 --- a/tests/touch/fifo +++ b/tests/touch/fifo @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version mkfifo_or_skip_ fifo diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing index 7c47c6184..96aa09232 100755 --- a/tests/touch/no-create-missing +++ b/tests/touch/no-create-missing @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version touch -c no-file > /dev/null 2>&1 || fail=1 diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference index 8d80fa5f5..95002e567 100755 --- a/tests/touch/no-dereference +++ b/tests/touch/no-dereference @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version ln -s nowhere dangling || framework_failure touch file || framework_failure diff --git a/tests/touch/no-rights b/tests/touch/no-rights index f0805e75d..d2032550b 100755 --- a/tests/touch/no-rights +++ b/tests/touch/no-rights @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version # Make sure t2 is newer than t1. touch -d '2000-01-01 00:00' t1 || framework_failure diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 68eef1fa9..9645f4dbd 100755 --- a/tests/touch/not-owner +++ b/tests/touch/not-owner @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version if env -- test -w /; then skip_test_ you have write access to /. diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other index b59f0d3bd..c7215022c 100755 --- a/tests/touch/now-owned-by-other +++ b/tests/touch/now-owned-by-other @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version require_root_ group_num=$(id -g $NON_ROOT_USERNAME) diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent index 3c0925b0f..9821fc1e4 100755 --- a/tests/touch/obsolescent +++ b/tests/touch/obsolescent @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version _POSIX2_VERSION=199209; export _POSIX2_VERSION POSIXLY_CORRECT=1; export POSIXLY_CORRECT diff --git a/tests/touch/read-only b/tests/touch/read-only index 06135c7b8..265f2880b 100755 --- a/tests/touch/read-only +++ b/tests/touch/read-only @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version skip_if_root_ : > read-only || framework_failure diff --git a/tests/touch/relative b/tests/touch/relative index b9f8c2c92..7e56a305a 100755 --- a/tests/touch/relative +++ b/tests/touch/relative @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure diff --git a/tests/touch/trailing-slash b/tests/touch/trailing-slash index c1fb8833e..97b910018 100755 --- a/tests/touch/trailing-slash +++ b/tests/touch/trailing-slash @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - touch --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && touch --version ln -s nowhere dangling || framework_failure ln -s loop loop || framework_failure |