summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-02-08 03:42:02 +0000
committerJim Meyering <jim@meyering.net>1999-02-08 03:42:02 +0000
commited2d3ddb6b4af6547e75f6123b6939086cb3e06c (patch)
tree726514b5d55fb96a316043a5aeb304908a736338 /tests
parent3dea3dfe0354ec161ce148bbbdb41052dabe2bd7 (diff)
downloadcoreutils-ed2d3ddb6b4af6547e75f6123b6939086cb3e06c.tar.xz
Use `stty', not $STTY.
Fix typo in VERBOSE code: s/\$RM/stty/.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/stty/basic-122
-rwxr-xr-xtests/stty/row-col-114
2 files changed, 16 insertions, 20 deletions
diff --git a/tests/stty/basic-1 b/tests/stty/basic-1
index 753440f13..2d2e7d191 100755
--- a/tests/stty/basic-1
+++ b/tests/stty/basic-1
@@ -1,11 +1,9 @@
#! /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
@@ -23,20 +21,20 @@ REV_oddp=1 REV_nl=1 REV_cooked=1 REV_raw=1 REV_pass8=1 REV_litout=1
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
@@ -46,18 +44,18 @@ if test -n "$RUN_LONG_TESTS"; then
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
diff --git a/tests/stty/row-col-1 b/tests/stty/row-col-1
index 09aa6fd65..c4be661d2 100755
--- a/tests/stty/row-col-1
+++ b/tests/stty/row-col-1
@@ -1,11 +1,9 @@
#! /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
@@ -27,7 +25,7 @@ set - $tests
saved_size=.saved-size
-$STTY size > $saved_size || exit 1
+stty size > $saved_size || exit 1
fail=0
while :; do
@@ -38,17 +36,17 @@ 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