2 # Verify that tail works even when it's reading from a file
3 # that is not at its beginning. Based on a report from John Roll.
5 if test "$VERBOSE" = yes; then
12 trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
13 trap '(exit $?); exit' 1 2 13 15
16 mkdir
$tmp || framework_failure
=1
17 cd $tmp || framework_failure
=1
19 (echo 1; echo 2) > k || framework_failure
=1
21 if test $framework_failure = 1; then
22 echo "$0: failure in testing framework" 1>&2
28 sh
-c 'read x; tail' < k
> out || fail
=1
34 test $fail = 1 && diff out exp
2> /dev
/null
36 (exit $fail); exit $fail