summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2009-12-08 08:00:37 +0000
committerPádraig Brady <P@draigBrady.com>2009-12-08 15:08:44 +0000
commit7ac41f995014067dd4f9eb6f75875f44f761e49a (patch)
tree7f5bb441c5a05c29508e832a787b535b99b4747e /tests
parentdcff25a925ced5a9d44e71178f6d60429e31dc50 (diff)
downloadcoreutils-7ac41f995014067dd4f9eb6f75875f44f761e49a.tar.xz
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.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/stty-row-col9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col
index 5efc7dd0a..fa6556f52 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