summaryrefslogtreecommitdiff
path: root/tests/stty
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-06-30 10:31:42 +0000
committerJim Meyering <jim@meyering.net>2006-06-30 10:31:42 +0000
commit28b3cf0a5c0b1e9bf0c5acd3f3f16ca1468d81a8 (patch)
treecd3b6740315597f26db647fa5cd2d8bd5a63f0a9 /tests/stty
parent2e63aaa8a953eb13808635fb8d3daaf276303fdb (diff)
downloadcoreutils-28b3cf0a5c0b1e9bf0c5acd3f3f16ca1468d81a8.tar.xz
* tests/stty/basic-1: Work around an intermittent test failure
on HP-UX 11.11. Report and analysis from Bob Proulx. http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7475
Diffstat (limited to 'tests/stty')
-rwxr-xr-xtests/stty/basic-15
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/stty/basic-1 b/tests/stty/basic-1
index c53410f50..8cdc45994 100755
--- a/tests/stty/basic-1
+++ b/tests/stty/basic-1
@@ -38,7 +38,10 @@ stty -raw -F no/such/file 2>/dev/null && fail=1
stty -raw -a 2>/dev/null && fail=1
# Build a list of all boolean options stty accepts on this system.
-options=`stty -a|tail -n +2|tr ';' '\n'|sed '/ = /d;s/^ //;s/-//g'`
+# Don't depend on terminal width. Put each option on its own line,
+# remove all non-boolean ones, then remove any leading hyphens.
+sed_del='/^speed/d;/^rows/d;/^columns/d;/ = /d'
+options=`stty -a | tr -s ';' '\n' | sed "s/^ //;$sed_del;s/-//g"`
# Take them one at a time, with and without the leading `-'.
for opt in $options; do