bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stty & stty-row-col test failures


From: Pádraig Brady
Subject: Re: stty & stty-row-col test failures
Date: Tue, 08 Dec 2009 10:20:33 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

I'm going with this unless there are objections

>From bb0ae98acca9fe2b27eb5ccadf57d4842cab5d8f Mon Sep 17 00:00:00 2001
From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
Date: Tue, 8 Dec 2009 08:00:37 +0000
Subject: [PATCH] tests: fix stty-row-col failure on small fixed terminals

* tests/misc/stty-row-col: Linux virtual consoles at least,
issue an error if you try to increase their size, so skip the
test if we can't increase the dimensions of the tty by 1 cell.
Reported by Matthew Burgess.
---
 tests/misc/stty-row-col |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col
index 5efc7dd..943565f 100755
--- a/tests/misc/stty-row-col
+++ b/tests/misc/stty-row-col
@@ -60,6 +60,15 @@ set $tests
 saved_size=`stty size` && test -n "$saved_size" \
   || skip_test_ "can't get window size"

+# Linux virtual consoles issue an error if you
+# try to increase their size.  So skip in that case.
+if ! test "x$saved_size" = "x0 0"; then
+  srow=`echo $saved_size | cut -d ' ' -f1`
+  scol=`echo $saved_size | cut -d ' ' -f2`
+  stty rows `expr $srow + 1` cols `expr $scol + 1` ||
+    skip_test_ "can't increase window size"
+fi
+
 while :; do
   test_name=$1
   args=$2
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]