mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 14:23:09 +00:00
0562e599a6
Prior to this change, tmux based tests would call 'isolated-tmux' which would initialize tmux on first call, an admitted "evil hack." Switch to requiring an explicit call to 'isolated-tmux-start' which then defines 'isolated-tmux' and other functions. Add some loop-until-prompt logic into 'isolated-tmux-start'. This improves reliability of the tmux tests on systems under load; at least it makes the tests pass in the background on my Mac. Remove the '$sleep' variable, to be replaced with 'tmux-sleep'.
20 lines
463 B
Fish
20 lines
463 B
Fish
#RUN: %fish %s
|
|
#REQUIRES: command -v tmux
|
|
|
|
set -g isolated_tmux_fish_extra_args -C '
|
|
function fish_prompt; printf "prompt $status_generation> <$prompt_var> "; end
|
|
function on_prompt_var --on-variable prompt_var
|
|
commandline -f repaint
|
|
end
|
|
'
|
|
|
|
isolated-tmux-start
|
|
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 0> <>
|
|
|
|
set -q CI && set sleep sleep 10
|
|
set -U prompt_var changed
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 0> <changed>
|