summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rwxr-xr-xtests/stty/row-col-18
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index f2aea9cf0..8b32b4c1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
+ * tests/stty/row-col-1: Rewrite to avoid temporary file that is
+ sometimes left behind if the test is skipped or interrupted.
+
* bootstrap (symlink_to_gnulib): New function.
(cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
to copies-of-gnulib.
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