]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Use `stty', not $STTY.
authorJim Meyering <jim@meyering.net>
Mon, 8 Feb 1999 03:42:02 +0000 (03:42 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 8 Feb 1999 03:42:02 +0000 (03:42 +0000)
Fix typo in VERBOSE code: s/\$RM/stty/.

tests/stty/basic-1
tests/stty/row-col-1

index 753440f130d8f8d95093ba7ce6c2c54b692c4ad7..2d2e7d19116ebeeea9dba935c3a4ae32684efdf7 100755 (executable)
@@ -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
index 09aa6fd65d645b0fe980be19b4c238a4aa806e00..c4be661d2f2071611bf177d20d33c7e83f9952f0 100755 (executable)
@@ -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