2021-03-21 16:25:29 +08:00
|
|
|
#RUN: %fish -C 'set -g fish %fish' %s
|
|
|
|
#REQUIRES: command -v tmux
|
2021-03-26 14:35:01 +08:00
|
|
|
# Don't run this on GitHub Actions since it's flaky.
|
|
|
|
#REQUIRES: test "$CI" != true
|
2021-03-21 16:25:29 +08:00
|
|
|
|
2021-04-19 22:15:01 +08:00
|
|
|
# HACK: THIS IS DISABLED for now, since it doesn't work at the moment.
|
|
|
|
#REQUIRES: false
|
|
|
|
|
2021-03-21 16:25:29 +08:00
|
|
|
# Isolated tmux.
|
|
|
|
set -g tmpdir (mktemp -d)
|
|
|
|
set -g tmux tmux -S $tmpdir/.tmux-socket -f /dev/null
|
|
|
|
|
2021-03-26 14:35:01 +08:00
|
|
|
set -g sleep sleep .1
|
2021-03-21 16:25:29 +08:00
|
|
|
|
2021-04-19 03:09:48 +08:00
|
|
|
set fish (builtin realpath $fish)
|
2021-03-21 16:25:29 +08:00
|
|
|
cd $tmpdir
|
|
|
|
|
2021-04-17 04:19:26 +08:00
|
|
|
$tmux new-session -x 80 -y 10 -d $fish -C '
|
2021-03-21 16:25:29 +08:00
|
|
|
# This is similar to "tests/interactive.config".
|
|
|
|
function fish_greeting; end
|
|
|
|
function fish_prompt; printf "prompt $status_generation> "; end
|
|
|
|
# No autosuggestion from older history.
|
|
|
|
set fish_history ""
|
|
|
|
'
|
|
|
|
$sleep # Let fish draw a prompt.
|
|
|
|
|
|
|
|
# Don't escape existing token (#7526).
|
|
|
|
echo >file-1
|
|
|
|
echo >file-2
|
|
|
|
$tmux send-keys 'HOME=$PWD ls ~/' Tab
|
|
|
|
$sleep
|
|
|
|
$tmux capture-pane -p
|
2021-04-12 09:13:39 +08:00
|
|
|
# Note the contents may or may not have the autosuggestion appended - it is a race.
|
|
|
|
# CHECK: prompt 0> HOME=$PWD ls ~/file-{{1?}}
|
2021-03-21 16:25:29 +08:00
|
|
|
# CHECK: ~/file-1 ~/file-2
|
|
|
|
|
|
|
|
# No pager on single smartcase completion (#7738).
|
|
|
|
$tmux send-keys C-u C-l 'mkdir cmake CMakeFiles' Enter C-l \
|
|
|
|
'cat cmake' Tab
|
|
|
|
$sleep
|
|
|
|
$tmux capture-pane -p
|
|
|
|
# CHECK: prompt 1> cat cmake/
|
|
|
|
|
2021-03-21 04:34:08 +08:00
|
|
|
# Correct case in pager when prefixes differ in case (#7743).
|
2021-03-21 16:25:29 +08:00
|
|
|
$tmux send-keys C-u C-l 'complete -c foo2 -a "aabc aaBd" -f' Enter C-l \
|
|
|
|
'foo2 A' Tab
|
|
|
|
$sleep
|
|
|
|
$tmux capture-pane -p
|
|
|
|
# The "bc" part is the autosuggestion - we could use "tmux capture-pane -e" to check colors.
|
|
|
|
# CHECK: prompt 2> foo2 aabc
|
|
|
|
# CHECK: aabc aaBd
|
|
|
|
|
|
|
|
$tmux kill-server
|
|
|
|
rm -r $tmpdir
|