#! /bin/sh
# Make sure stty can parse most of its options.
-: ${STTY=stty}
-
if test "$VERBOSE" = yes; then
set -x
- $RM --version
+ stty --version
fi
# The following list of reversible options was generated with
REV_cbreak=1 REV_decctlq=1 REV_tabs=1 REV_lcase=1 REV_LCASE=1
saved_state=.saved-state
-$STTY --save > $saved_state || exit 1
-trap "status=$?; $STTY `cat $saved_state`; rm -f $saved_state; exit $status" \
+stty --save > $saved_state || exit 1
+trap "status=$?; stty `cat $saved_state`; rm -f $saved_state; exit $status" \
0 1 2 3 15
-$STTY `cat $saved_state` || exit 1
+stty `cat $saved_state` || exit 1
# Build a list of all boolean options stty accepts on this system.
options=`stty -a|tail +2|tr ';' '\012'|sed '/ = /d;s/^ //'|tr -s ' -' '\012'`
# Take them one at a time, with and without the leading `-'.
for opt in $options; do
- $STTY $opt || exit 1
+ stty $opt || exit 1
rev=`eval echo "\\\$REV_$opt"`
if test -n "$rev"; then
- $STTY -$opt || exit 1
+ stty -$opt || exit 1
fi
done
echo .|tr -d '\012'
for opt2 in $options; do
- $STTY $opt1 $opt2 || exit 1
+ stty $opt1 $opt2 || exit 1
rev1=`eval echo "\\\$REV_$opt1"`
rev2=`eval echo "\\\$REV_$opt2"`
if test -n "$rev1"; then
- $STTY -$opt1 $opt2 || exit 1
+ stty -$opt1 $opt2 || exit 1
fi
if test -n "$rev2"; then
- $STTY $opt1 -$opt2 || exit 1
+ stty $opt1 -$opt2 || exit 1
fi
if test "$rev1$rev2" = 11; then
- $STTY -$opt1 -$opt2 || exit 1
+ stty -$opt1 -$opt2 || exit 1
fi
done
done
#! /bin/sh
# This script takes no arguments.
-: ${STTY=stty}
-
if test "$VERBOSE" = yes; then
set -x
- $RM --version
+ stty --version
fi
# Versions of GNU stty from shellutils-1.9.2c and earlier failed
saved_size=.saved-size
-$STTY size > $saved_size || exit 1
+stty size > $saved_size || exit 1
fail=0
while :; do
test "x$args" = xLAST && break
args=`echo x$args|tr _ ' '|sed 's/^x//'`
if test "$VERBOSE" = yes; then
- # echo "testing \`$STTY $args; $STTY size\` = $expected_result ..."
+ # echo "testing \`stty $args; stty size\` = $expected_result ..."
echo "test $test_name... " | tr -d '\012'
fi
- $STTY $args || exit 1
- test x"`$STTY size 2> /dev/null`" = "x$expected_result" \
+ stty $args || exit 1
+ test x"`stty size 2> /dev/null`" = "x$expected_result" \
&& ok=ok || ok=FAIL fail=1
test "$VERBOSE" = yes && echo $ok
shift; shift; shift
done
-$STTY `cat $saved_size|sed 's/ / columns /;s/^/rows /'` || exit 1
+stty `cat $saved_size|sed 's/ / columns /;s/^/rows /'` || exit 1
rm -f $saved_size
exit $fail