mirror of
https://github.com/tmux/tmux.git
synced 2026-10-12 21:54:23 +00:00
Fix tests for macOS.
This commit is contained in:
@@ -81,10 +81,16 @@ if grep -Fq "$smcup" "$off"; then
|
|||||||
fail "clear-on-attach off used smcup"
|
fail "clear-on-attach off used smcup"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# screen has the indn capability (CSI Ps S), which the preserving path uses
|
# Some screen terminfo entries have indn (CSI Ps S), while older ones only
|
||||||
# after setting the scrolling region and moving to its last line.
|
# have ind (newline). The preserving path uses indn once or repeats ind once
|
||||||
|
# for every line in the terminal plus one.
|
||||||
escape=$(printf '\033')
|
escape=$(printf '\033')
|
||||||
LC_ALL=C grep -Eq "${escape}\\[[0-9]+S" "$off" ||
|
if ! LC_ALL=C grep -Eq "${escape}\\[[0-9]+S" "$off"; then
|
||||||
fail "clear-on-attach off did not scroll the old contents away"
|
hex=$(od -An -tx1 -v "$off" | tr -d ' \n')
|
||||||
|
case "$hex" in
|
||||||
|
*0a0a0a0a0a0a0a0a0a0a0a0a*) ;;
|
||||||
|
*) fail "clear-on-attach off did not scroll the old contents away" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ $INNER set-option -g status off || exit 1
|
|||||||
$INNER set-option -g window-size manual || exit 1
|
$INNER set-option -g window-size manual || exit 1
|
||||||
$INNER set-option -g mouse on || exit 1
|
$INNER set-option -g mouse on || exit 1
|
||||||
$INNER set-window-option pane-scrollbars auto-hide || exit 1
|
$INNER set-window-option pane-scrollbars auto-hide || exit 1
|
||||||
$INNER set-window-option pane-scrollbars-timeout 300 || exit 1
|
$INNER set-window-option pane-scrollbars-timeout 3000 || exit 1
|
||||||
$INNER set-window-option pane-scrollbars-style \
|
$INNER set-window-option pane-scrollbars-style \
|
||||||
'bg=colour196,fg=colour231,width=1,pad=0' || exit 1
|
'bg=colour196,fg=colour231,width=1,pad=0' || exit 1
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ wait_for_client
|
|||||||
# to expire before taking the hidden reference capture.
|
# to expire before taking the hidden reference capture.
|
||||||
$INNER copy-mode -H || exit 1
|
$INNER copy-mode -H || exit 1
|
||||||
$INNER send-keys -X history-top || exit 1
|
$INNER send-keys -X history-top || exit 1
|
||||||
sleep 0.7
|
sleep 3.5
|
||||||
capture "$HIDDEN"
|
capture "$HIDDEN"
|
||||||
|
|
||||||
# A copy-mode page movement shows the overlay and starts its timer. Capture
|
# A copy-mode page movement shows the overlay and starts its timer. Capture
|
||||||
@@ -74,7 +74,7 @@ capture "$HIDDEN"
|
|||||||
$INNER send-keys -X page-down || exit 1
|
$INNER send-keys -X page-down || exit 1
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
capture "$VISIBLE"
|
capture "$VISIBLE"
|
||||||
sleep 0.7
|
sleep 3.5
|
||||||
capture "$AFTER"
|
capture "$AFTER"
|
||||||
cmp -s "$VISIBLE" "$AFTER" && fail "scrollbar did not hide after timeout"
|
cmp -s "$VISIBLE" "$AFTER" && fail "scrollbar did not hide after timeout"
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ capture "$VISIBLE"
|
|||||||
cmp -s "$HIDDEN" "$VISIBLE" && fail "scrollbar did not appear on hover"
|
cmp -s "$HIDDEN" "$VISIBLE" && fail "scrollbar did not appear on hover"
|
||||||
away=$(printf '\033[<35;5;5M')
|
away=$(printf '\033[<35;5;5M')
|
||||||
$OUTER send-keys -l "$away" || exit 1
|
$OUTER send-keys -l "$away" || exit 1
|
||||||
sleep 0.7
|
sleep 3.5
|
||||||
capture "$AFTER"
|
capture "$AFTER"
|
||||||
cmp -s "$HIDDEN" "$AFTER" || fail "scrollbar did not hide after hover"
|
cmp -s "$HIDDEN" "$AFTER" || fail "scrollbar did not hide after hover"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user