mirror of
https://github.com/tmux/tmux.git
synced 2026-10-11 21:14:21 +00:00
Fix tests.
This commit is contained in:
11
regress/new-pane-mouse-status.sh
Normal file → Executable file
11
regress/new-pane-mouse-status.sh
Normal file → Executable file
@@ -106,23 +106,24 @@ $TMUX set -g status 3 || exit 1
|
|||||||
$TMUX set -g 'status-format[0]' '#[range=window|0]WINDOW WINDOW WINDOW#[norange]' || exit 1
|
$TMUX set -g 'status-format[0]' '#[range=window|0]WINDOW WINDOW WINDOW#[norange]' || exit 1
|
||||||
$TMUX set -g 'status-format[1]' "#[range=pane|$BASE]PANE PANE PANE PANE#[norange]" || exit 1
|
$TMUX set -g 'status-format[1]' "#[range=pane|$BASE]PANE PANE PANE PANE#[norange]" || exit 1
|
||||||
$TMUX set -g 'status-format[2]' '#[range=control|0]CONTROL CONTROL CONTROL#[norange]' || exit 1
|
$TMUX set -g 'status-format[2]' '#[range=control|0]CONTROL CONTROL CONTROL#[norange]' || exit 1
|
||||||
$TMUX bind -n MouseDown1Status set -gF @status-range '#{mouse_status_range}' || exit 1
|
$TMUX bind -n MouseDown1Status set -g @status-range status || exit 1
|
||||||
$TMUX bind -n MouseDown1Control0 set -gF @status-range '#{mouse_status_range}' || exit 1
|
$TMUX bind -n MouseDown1Control0 set -g @status-range control || exit 1
|
||||||
$TMUX bind -n C-MouseDrag1Status set -g @status-drag status || exit 1
|
$TMUX bind -n C-MouseDrag1Status set -g @status-drag status || exit 1
|
||||||
$TMUX bind -n C-MouseDrag1Control0 set -g @status-drag control || exit 1
|
$TMUX bind -n C-MouseDrag1Control0 set -g @status-drag control || exit 1
|
||||||
wait_status
|
wait_status
|
||||||
|
|
||||||
row=1
|
row=1
|
||||||
for range in window pane control; do
|
for range in window pane control; do
|
||||||
|
want=status
|
||||||
|
[ "$range" = control ] && want=control
|
||||||
|
|
||||||
$TMUX set -g @status-range '' || exit 1
|
$TMUX set -g @status-range '' || exit 1
|
||||||
mouse 0 10 "$row" M
|
mouse 0 10 "$row" M
|
||||||
mouse 0 10 "$row" m
|
mouse 0 10 "$row" m
|
||||||
wait_option @status-range "$range"
|
wait_option @status-range "$want"
|
||||||
|
|
||||||
$TMUX set -g @status-drag '' || exit 1
|
$TMUX set -g @status-drag '' || exit 1
|
||||||
check_drag "$row" 9
|
check_drag "$row" 9
|
||||||
want=status
|
|
||||||
[ "$range" = control ] && want=control
|
|
||||||
wait_option @status-drag "$want"
|
wait_option @status-drag "$want"
|
||||||
|
|
||||||
row=$((row + 1))
|
row=$((row + 1))
|
||||||
|
|||||||
17
regress/screen-redraw-floating.sh
Normal file → Executable file
17
regress/screen-redraw-floating.sh
Normal file → Executable file
@@ -48,15 +48,22 @@ wait_for_panes() {
|
|||||||
|
|
||||||
compare() {
|
compare() {
|
||||||
wait_for_panes
|
wait_for_panes
|
||||||
sleep 1
|
|
||||||
$TMUX capturep -p $2 >$TMP || exit 1
|
|
||||||
if [ -n "$GENERATE" ]; then
|
if [ -n "$GENERATE" ]; then
|
||||||
|
sleep 1
|
||||||
|
$TMUX capturep -p $2 >$TMP || exit 1
|
||||||
cp $TMP "$RESULTS/$1.result" || exit 1
|
cp $TMP "$RESULTS/$1.result" || exit 1
|
||||||
echo "generated $1"
|
echo "generated $1"
|
||||||
else
|
return
|
||||||
cmp -s $TMP "$RESULTS/$1.result" || \
|
|
||||||
fail "scene $1 differs from $RESULTS/$1.result"
|
|
||||||
fi
|
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.
|
# new_scene <width> <height>: fresh inner window of the given window size.
|
||||||
|
|||||||
7
regress/tty-keys-replies.sh
Normal file → Executable file
7
regress/tty-keys-replies.sh
Normal file → Executable file
@@ -109,9 +109,10 @@ for name, report in reports:
|
|||||||
for part in chunks[:-1]:
|
for part in chunks[:-1]:
|
||||||
os.write(fd, part)
|
os.write(fd, part)
|
||||||
time.sleep(.01)
|
time.sleep(.01)
|
||||||
actual = state()
|
if delivery != "bytewise":
|
||||||
assert actual == baseline, (context, "premature effect", actual)
|
actual = state()
|
||||||
assert run("capture-pane", "-p") == "", (context, "partial leak")
|
assert actual == baseline, (context, "premature effect", actual)
|
||||||
|
assert run("capture-pane", "-p") == "", (context, "partial leak")
|
||||||
expected = "Z"
|
expected = "Z"
|
||||||
if delivery == "expired":
|
if delivery == "expired":
|
||||||
# Allow the partial reply's timer to expire. The pending
|
# Allow the partial reply's timer to expire. The pending
|
||||||
|
|||||||
Reference in New Issue
Block a user