summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-01-06 14:40:03 +0000
committerPádraig Brady <P@draigBrady.com>2016-01-06 15:20:49 +0000
commitcb7d8b90a213c0186a8c8ba66da959e1f5930e78 (patch)
tree7c71619d355e0e4b57d59aec837924d840b85f13 /tests/misc
parent5171befcb122b12677f60715603be091625a9e08 (diff)
downloadcoreutils-cb7d8b90a213c0186a8c8ba66da959e1f5930e78.tar.xz
stty: support [-]drain setting to control waiting for pending Tx
Instead of commit v8.24-132-g5171bef which only provides control to disable this behavior (with -I), provide the symmetrical "[-]drain" special setting. * src/stty.c (main): Parse the [-]drain setting instead of -I, and treat like a global option. (usage): Adjust accordingly. * tests/misc/stty.sh: Test "drain" with and without options. * NEWS: Mention the new feature.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/stty.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/misc/stty.sh b/tests/misc/stty.sh
index 88d5796cf..5735b764a 100755
--- a/tests/misc/stty.sh
+++ b/tests/misc/stty.sh
@@ -35,8 +35,12 @@ stty $(cat $saved_state) || fail=1
# This would segfault prior to sh-utils-2.0j.
stty erase - || fail=1
-# Ensure --immediate mode is supported
-stty -I erase - || fail=1
+# Ensure "immediate" and "wait" mode supported, with and without settings
+for mode in '-drain' 'drain'; do
+ for opt in 'echo' ''; do
+ stty "$mode" $opt || fail=1
+ done
+done
# These would improperly ignore invalid options through coreutils 5.2.1.
returns_ 1 stty -F 2>/dev/null || fail=1