tests: move input-tty into a test-lib.sh function
[platform/upstream/coreutils.git] / tests / misc / stty
index c9fd67d..8216c8e 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Make sure stty can parse most of its options.
 
-# Copyright (C) 1998-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2004, 2006-2008 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
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
 fi
 
 # Make sure there's a tty on stdin.
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $srcdir/test-lib.sh
+require_controlling_input_terminal_
 
 # The following list of reversible options was generated with
 # grep -w REV stty.c|sed -n '/^  {"/{s//REV_/;s/".*/=1/;p;}'|fmt
@@ -100,4 +100,4 @@ fi
 
 stty `cat $saved_state`
 
-exit $fail
+(exit $fail); exit $fail