mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +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'.
30 lines
925 B
Fish
30 lines
925 B
Fish
#RUN: %fish %s
|
|
#REQUIRES: command -v tmux
|
|
|
|
isolated-tmux-start
|
|
|
|
# Don't escape existing token (#7526).
|
|
echo >file-1
|
|
echo >file-2
|
|
isolated-tmux send-keys 'HOME=$PWD ls ~/' Tab
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# Note the contents may or may not have the autosuggestion appended - it is a race.
|
|
# CHECK: prompt 0> HOME=$PWD ls ~/file-{{1?}}
|
|
# CHECK: ~/file-1 ~/file-2
|
|
|
|
# No pager on single smartcase completion (#7738).
|
|
isolated-tmux send-keys C-u C-l 'mkdir cmake CMakeFiles' Enter C-l \
|
|
'cat cmake' Tab
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 1> cat cmake/
|
|
|
|
# Correct case in pager when prefixes differ in case (#7743).
|
|
isolated-tmux send-keys C-u C-l 'complete -c foo2 -a "aabc aaBd" -f' Enter C-l \
|
|
'foo2 A' Tab
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# The "bc" part is the autosuggestion - we could use "capture-pane -e" to check colors.
|
|
# CHECK: prompt 2> foo2 aabc
|
|
# CHECK: aabc aaBd
|