From df0beae1eb1318869d51a064aec8fdd401877cbf Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 6 Sep 2007 17:34:49 +0200 Subject: Adjust chgrp, chmod, chown, cp tests to use test-lib.sh. * tests/check.mk: Also define abs_top_builddir. --- tests/cp/same-file | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'tests/cp/same-file') diff --git a/tests/cp/same-file b/tests/cp/same-file index 9e4d0cca5..7bf6da853 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -2,7 +2,7 @@ # Test some of cp's options and how cp handles situations in # which a naive implementation might overwrite the source file. -# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006 Free Software +# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006-2007 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then fi . $srcdir/../lang-default -. $srcdir/../envvar-check +. $srcdir/../test-lib.sh # Unset CDPATH. Otherwise, output from the `cd dir' command # can make this test fail. @@ -32,20 +32,6 @@ fi VERSION_CONTROL=numbered; export VERSION_CONTROL -pwd=`pwd` -t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0 -trap '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 'failure in testing framework' - exit 1 -fi - actual=actual-$$ expected=expected-$$ @@ -210,8 +196,6 @@ EOF fail=0; -# Some folks don't have diff. -cmp $expected $actual \ - || { diff -c $expected $actual 1>&2; fail=1; } +compare $expected $actual || fail=1 (exit $fail); exit $fail -- cgit v1.2.3-54-g00ecf