From: Jim Meyering Date: Tue, 17 Aug 1999 10:15:50 +0000 (+0000) Subject: source input-tty instead of open-coding it X-Git-Tag: FILEUTILS-4_0j-trial~337 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=13955cb7c14fe3e8d21975bab201eeec5d70b9c6;p=thirdparty%2Fcoreutils.git source input-tty instead of open-coding it --- diff --git a/tests/stty/basic-1 b/tests/stty/basic-1 index 0361ba497f..b2c8d5a7c0 100755 --- a/tests/stty/basic-1 +++ b/tests/stty/basic-1 @@ -6,12 +6,8 @@ if test "$VERBOSE" = yes; then stty --version fi -tty -s || have_input_tty=no -if test "$have_input_tty" = no; then - echo "$0: This test must have a controlling input \`terminal'," 1>&2 - echo "so it may not be run via rsh" 1>&2 - exit 77 -fi +# Make sure there's a tty on stdin. +. $srcdir/input-tty # The following list of reversible options was generated with # grep -w REV stty.c|sed -n '/^ {"/{s//REV_/;s/".*/=1/;p;}'|fmt diff --git a/tests/stty/row-col-1 b/tests/stty/row-col-1 index f4a2374d59..c2d772cf48 100755 --- a/tests/stty/row-col-1 +++ b/tests/stty/row-col-1 @@ -6,12 +6,8 @@ if test "$VERBOSE" = yes; then stty --version fi -tty -s || have_input_tty=no -if test "$have_input_tty" = no; then - echo "$0: This test must have a controlling input \`terminal'," 1>&2 - echo "so it may not be run via rsh" 1>&2 - exit 77 -fi +# Make sure there's a tty on stdin. +. $srcdir/input-tty # Versions of GNU stty from shellutils-1.9.2c and earlier failed # tests #2 and #4 when run on SunOS 4.1.3.