diff options
Diffstat (limited to 'tests/cp/same-file')
-rwxr-xr-x | tests/cp/same-file | 22 |
1 files changed, 3 insertions, 19 deletions
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 |