summaryrefslogtreecommitdiff
path: root/tests/misc/head-c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/head-c')
-rwxr-xr-xtests/misc/head-c18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/misc/head-c b/tests/misc/head-c
index c75b0541c..1520ea610 100755
--- a/tests/misc/head-c
+++ b/tests/misc/head-c
@@ -1,7 +1,7 @@
#!/bin/sh
# exercise the fix of 2001-08-18, based on test case from Ian Bruce
-# Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 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
@@ -21,23 +21,11 @@ if test "$VERBOSE" = yes; then
head --version
fi
-pwd=`pwd`
-tmp=head-c.$$
-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 abc > in || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework' 1>&2
- (exit 1); exit 1
-fi
+echo abc > in || framework_failure
fail=0
-
(head -c1; head -c1) < in > out || fail=1
case "`cat out`" in
ab) ;;