]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: stty: filter out ispeed and ospeed from boolean options
authorCollin Funk <collin.funk1@gmail.com>
Sun, 2 Nov 2025 18:57:21 +0000 (10:57 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Sun, 2 Nov 2025 18:57:21 +0000 (10:57 -0800)
* tests/stty/stty-pairs.sh: Also ignore lines starting with ispeed and
ospeed.
* tests/stty/stty.sh: Likewise.
Reported by Bernhard Voelker.

tests/stty/stty-pairs.sh
tests/stty/stty.sh

index aebbd7fe71cb79ef6f5f1c975c476c86809bf56f..2af9ac78c8fdf9c04f3256942cf4da4413aad7e4 100755 (executable)
@@ -38,7 +38,7 @@ stty $(cat $saved_state) || fail=1
 # Don't depend on terminal width.  Put each option on its own line,
 # remove all non-boolean ones, remove 'parenb' and 'cread' explicitly,
 # then remove any leading hyphens.
-sed_del='/^speed/d;/^rows/d;/^columns/d;/ = /d;s/parenb//;s/cread//'
+sed_del='/^[io]*speed/d;/^rows/d;/^columns/d;/ = /d;s/parenb//;s/cread//'
 options=$(stty -a | tr -s ';' '\n' | sed "s/^ //;$sed_del;s/-//g")
 
 # Take them in pairs, with and without the leading '-'.
index c0f74947a37db105f74d51d2be8b1c52d42473b5..b224ae41fe55c64bc166349aed3a1e19c9b52112 100755 (executable)
@@ -51,7 +51,7 @@ returns_ 1 stty -raw -a 2>/dev/null || fail=1
 # Build a list of all boolean options stty accepts on this system.
 # 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'
+sed_del='/^[io]*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 '-'.