summaryrefslogtreecommitdiff
path: root/tests/stty/basic-1
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-08-14 12:42:03 +0000
committerJim Meyering <jim@meyering.net>1999-08-14 12:42:03 +0000
commit7fda0e10653dd20394aa83acdc286fac4fff341d (patch)
tree055bfeca4657cb436689d5eac267f66ad6883f0f /tests/stty/basic-1
parentb91360e4841075fe6ea679dd821a5dfd3f292cf4 (diff)
downloadcoreutils-7fda0e10653dd20394aa83acdc286fac4fff341d.tar.xz
Fail-77 if stdin is not a tty.
Diffstat (limited to 'tests/stty/basic-1')
-rwxr-xr-xtests/stty/basic-17
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/stty/basic-1 b/tests/stty/basic-1
index 5be8c7d75..0361ba497 100755
--- a/tests/stty/basic-1
+++ b/tests/stty/basic-1
@@ -6,6 +6,13 @@ 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
+
# The following list of reversible options was generated with
# grep -w REV stty.c|sed -n '/^ {"/{s//REV_/;s/".*/=1/;p;}'|fmt
REV_parenb=1 REV_parodd=1 REV_hupcl=1 REV_hup=1 REV_cstopb=1 REV_cread=1