Fix tests.

This commit is contained in:
Nicholas Marriott
2026-10-07 08:06:16 +01:00
parent 20555f1508
commit 3b20a0418a
3 changed files with 22 additions and 13 deletions

17
regress/screen-redraw-floating.sh Normal file → Executable file
View File

@@ -48,15 +48,22 @@ wait_for_panes() {
compare() {
wait_for_panes
sleep 1
$TMUX capturep -p $2 >$TMP || exit 1
if [ -n "$GENERATE" ]; then
sleep 1
$TMUX capturep -p $2 >$TMP || exit 1
cp $TMP "$RESULTS/$1.result" || exit 1
echo "generated $1"
else
cmp -s $TMP "$RESULTS/$1.result" || \
fail "scene $1 differs from $RESULTS/$1.result"
return
fi
tries=0
while [ "$tries" -lt 100 ]; do
$TMUX capturep -p $2 >$TMP || exit 1
cmp -s $TMP "$RESULTS/$1.result" && return
sleep 0.1
tries=$((tries + 1))
done
fail "scene $1 differs from $RESULTS/$1.result"
}
# new_scene <width> <height>: fresh inner window of the given window size.