diff options
author | Jim Meyering <jim@meyering.net> | 2007-09-13 08:44:26 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-09-15 08:40:39 +0200 |
commit | 53d36aaf9a856f523bd52de479a88f14338edda3 (patch) | |
tree | d43c74c6219ab7e0f8d294c131189034b15bea47 /tests/tail-2/start-middle | |
parent | 10d190b8b6289f8a4b4818bd03b8f3a5dc87fd14 (diff) | |
download | coreutils-53d36aaf9a856f523bd52de479a88f14338edda3.tar.xz |
Adapt tests/tail-2/ to use test-lib.sh.
Diffstat (limited to 'tests/tail-2/start-middle')
-rwxr-xr-x | tests/tail-2/start-middle | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle index 6e7cda0de..7e62a4073 100755 --- a/tests/tail-2/start-middle +++ b/tests/tail-2/start-middle @@ -2,7 +2,7 @@ # Verify that tail works even when it's reading from a file # that is not at its beginning. Based on a report from John Roll. -# Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,21 +22,9 @@ if test "$VERBOSE" = yes; then tail --version fi -pwd=`pwd` -tmp=tail-mid.$$ -trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 -trap '(exit $?); exit' 1 2 13 15 +. $srcdir/../test-lib.sh -framework_failure=0 -mkdir $tmp || framework_failure=1 -cd $tmp || framework_failure=1 - -(echo 1; echo 2) > k || framework_failure=1 - -if test $framework_failure = 1; then - echo "$0: failure in testing framework" 1>&2 - (exit 1); exit 1 -fi +(echo 1; echo 2) > k || framework_failure fail=0 @@ -45,7 +33,6 @@ cat <<EOF > exp 2 EOF -cmp out exp || fail=1 -test $fail = 1 && diff out exp 2> /dev/null +compare out exp || fail=1 (exit $fail); exit $fail |