More print-to-pipe error checking in tests.

This commit is contained in:
John Hood
2016-11-29 22:31:33 -05:00
parent 60c5b022f8
commit 278fd12ec1
4 changed files with 9 additions and 11 deletions
+1 -3
View File
@@ -23,10 +23,8 @@ baseline()
{
# Generate updates that don't change the screen
i=0
while [ $i -lt 10 ]; do
printf 'x\b'
while [ $i -lt 10 ] && printf 'x\b' && sleep 1; do
i=$((i + 1))
sleep 1
done
}
+2 -2
View File
@@ -52,8 +52,8 @@ tmux_commands()
sleep 1
printf "send-keys 0x04\n"
# This will get killed by SIGPIPE.
while printf "show-options\n"; do
sleep 1
while printf "show-options\n" && sleep 1; do
:
done
}
+4 -4
View File
@@ -36,8 +36,8 @@ tmux_commands()
# And stop the test script, so it produces its exit messge.
printf "send-keys 0x0d\n"
# This will get killed by SIGPIPE.
while printf "show-options\n"; do
sleep 1
while printf "show-options\n" && sleep 1; do
:
done
}
@@ -55,8 +55,8 @@ baseline()
printf 'a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk\nl\nm\nn\no\np\nq\nr\ns\nt\nu\nv\nw\nx\ny\nz\n'
done)
read -r x
while true; do
printf '%s' "$blat"
while printf '%s' "$blat"; do
:
done &
printpid=$!
(sleep 120; kill $$ $printpid) &
+2 -2
View File
@@ -51,8 +51,8 @@ server()
# Constantly send keyboard input.
tmux_commands()
{
while printf "send-keys 0x0d\n"; do
sleepf
while printf "send-keys 0x0d\n" && sleepf; do
:
done
}