4 # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # This script takes no arguments.
23 if test -n "$DJDIR"; then
24 echo "$0: cannot test nice on DJGPP" >&2
53 if test "$VERBOSE" = yes; then
58 # Require that this test be run at `nice' level 0.
60 if test "$niceness" = 0; then
63 echo "$0: this test must be run at nice level 0" 1>&2
72 test $args = empty && args=''
73 test x$args = xLAST && break
74 args=`echo x$args|tr : ' '|sed 's/^x//'`
75 if test "$VERBOSE" = yes; then
76 #echo "testing \`nice $args nice\` = $expected_result ..."
77 echo "test $test_name... " | tr -d '\n'
79 test x`nice $args nice 2> /dev/null` = x$expected_result \
80 && ok=ok || ok=FAIL fail=1
81 test "$VERBOSE" = yes && echo $ok
82 test x`nice $args nice 2> /dev/null` = x$expected_result || fail=1