testing sleepy tests in CI
This commit is contained in:
parent
39b8dcc89a
commit
36f946b1c9
|
@ -9,11 +9,11 @@ function test_clean_up() {
|
|||
|
||||
function tmux_send() {
|
||||
local key=$1
|
||||
sleep 0.5
|
||||
tmuxomatic__sleep 1
|
||||
tmuxomatic send-keys "$TMUX_PREFIX"
|
||||
sleep 0.5
|
||||
tmuxomatic__sleep 1
|
||||
tmuxomatic send-keys "$key"
|
||||
sleep 0.5
|
||||
tmuxomatic__sleep 1
|
||||
}
|
||||
|
||||
function tmux_paste() {
|
||||
|
@ -33,11 +33,11 @@ function init_pane_fish() {
|
|||
|
||||
function invoke_fingers() {
|
||||
tmux_send "F"
|
||||
sleep 1.0
|
||||
tmuxomatic__sleep 1
|
||||
}
|
||||
|
||||
function echo_yanked() {
|
||||
sleep 0.5
|
||||
tmuxomatic__sleep 1
|
||||
tmuxomatic__exec "clear"
|
||||
tmuxomatic send-keys "echo yanked text is "
|
||||
tmux_paste
|
||||
|
|
|
@ -17,6 +17,7 @@ tmuxomatic__exec "cat ./test/fixtures/grep-output"
|
|||
|
||||
invoke_fingers
|
||||
tmuxomatic send-keys C-c
|
||||
tmuxomatic__sleep 1
|
||||
|
||||
tmuxomatic__exec "echo \"current pane is \$(tmux list-panes -F '#{?window_zoomed_flag,zoomed,not_zoomed}' | head -1)\""
|
||||
tmuxomatic__expect "current pane is zoomed"
|
||||
|
|
|
@ -13,7 +13,7 @@ tmuxomatic__exec "cat ./test/fixtures/grep-output"
|
|||
invoke_fingers
|
||||
tmuxomatic send-keys "i"
|
||||
|
||||
sleep 10
|
||||
tmuxomatic__sleep 1
|
||||
tmuxomatic__exec "cat /tmp/tmux-yank-result"
|
||||
|
||||
tmuxomatic__expect "tmux-yank yolo"
|
||||
|
|
|
@ -58,7 +58,7 @@ function tmuxomatic__expect() {
|
|||
TMUXOMATIC_EXIT_CODE=0
|
||||
break
|
||||
fi
|
||||
sleep 0.5
|
||||
tmuxomatic__sleep 1
|
||||
done
|
||||
|
||||
if [[ $n_matches -le 0 ]]; then
|
||||
|
@ -75,6 +75,14 @@ function tmuxomatic__expect() {
|
|||
fi
|
||||
}
|
||||
|
||||
function tmuxomatic__sleep() {
|
||||
if [[ -z $CI ]]; then
|
||||
sleep "$1"
|
||||
else
|
||||
sleep "$(($1 * 5))"
|
||||
fi
|
||||
}
|
||||
|
||||
# TODO not working in BSD, therefore end hook not being called and :skull:
|
||||
function __fn_exists() {
|
||||
local fn_type=$(type "$1" 2> /dev/null)
|
||||
|
|
Loading…
Reference in New Issue