summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-09-18 20:34:50 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-09-18 20:34:50 +0000
commit46dd4b1a8ede10b94591d9302f92dc49d3f90838 (patch)
tree656fa5ce0bb12bf11266c06f5a95e284bb97dc36 /tests
parent058f319e6d762d4689e339c3d2124f4a3ce4bce4 (diff)
downloadcoreutils-46dd4b1a8ede10b94591d9302f92dc49d3f90838.tar.xz
* tests/stty/row-col-1: Rewrite to avoid temporary file that is
sometimes left behind if the test is skipped or interrupted.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/stty/row-col-18
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/stty/row-col-1 b/tests/stty/row-col-1
index 926579b1b..83d34a770 100755
--- a/tests/stty/row-col-1
+++ b/tests/stty/row-col-1
@@ -59,9 +59,7 @@ NA LAST NA
'
set $tests
-saved_size=.saved-size
-
-stty size > $saved_size \
+saved_size=`stty size` && test -n "$saved_size" \
|| { echo "$0: skipping this test: can't get window size" 1>&2;
exit 77; exit; }
@@ -84,7 +82,7 @@ while :; do
shift; shift; shift
done
-stty `cat $saved_size|sed 's/ / columns /;s/^/rows /'` || exit 1
-rm -f $saved_size
+set x $saved_size
+stty rows $2 columns $3 || exit 1
exit $fail