diff --git a/tests/checks/tmux-abbr.fish b/tests/checks/tmux-abbr.fish index a822b540c890..d2a040117d0f 100644 --- a/tests/checks/tmux-abbr.fish +++ b/tests/checks/tmux-abbr.fish @@ -11,33 +11,27 @@ isolated-tmux-start # Expand abbreviations on space. isolated-tmux send-keys abbr-test Space arg1 Enter -tmux-sleep # CHECK: prompt {{\d+}}> abbr-test [expanded] arg1 # Expand abbreviations at the cursor when executing. isolated-tmux send-keys abbr-test Enter -tmux-sleep # CHECK: prompt {{\d+}}> abbr-test [expanded] # Use Control+Z right after abbreviation expansion, to keep going without expanding. isolated-tmux send-keys abbr-test Space C-z arg2 Enter -tmux-sleep # CHECK: prompt {{\d+}}> abbr-test arg2 # Same with a redundant space; it does not expand abbreviations. isolated-tmux send-keys C-u abbr-test Space C-z Space arg2 Enter -tmux-sleep # CHECK: prompt {{\d+}}> abbr-test arg2 # Or use Control+Space ("bind -k nul") to the same effect. isolated-tmux send-keys abbr-test C-Space arg3 Enter -tmux-sleep # CHECK: prompt {{\d+}}> abbr-test arg3 # Do not expand abbrevation if the cursor is not at the command, even if it's just white space. # This makes the behavior more consistent with the above two scenarios. isolated-tmux send-keys abbr-test C-Space Enter -tmux-sleep # CHECK: prompt {{\d+}}> abbr-test # CHECK: prompt {{\d+}}> diff --git a/tests/checks/tmux-autosuggestion.fish b/tests/checks/tmux-autosuggestion.fish index ba6175a3a220..883e93b5f636 100644 --- a/tests/checks/tmux-autosuggestion.fish +++ b/tests/checks/tmux-autosuggestion.fish @@ -4,11 +4,10 @@ isolated-tmux-start isolated-tmux send-keys 'echo "foo bar baz"' Enter C-l isolated-tmux send-keys 'echo ' -tmux-sleep isolated-tmux send-keys M-Right +tmux-sleep isolated-tmux capture-pane -p # CHECK: prompt 1> echo "foo bar baz" -tmux-sleep touch COMPL @@ -25,7 +24,6 @@ isolated-tmux capture-pane -p # CHECK: prompt 2> : ./COMPL isolated-tmux send-keys C-u C-k C-l ': ./CO' -tmux-sleep isolated-tmux send-keys A C-h tmux-sleep isolated-tmux capture-pane -p diff --git a/tests/checks/tmux-bind.fish b/tests/checks/tmux-bind.fish index 54c8f4f6f822..c7e3bd53c1e7 100644 --- a/tests/checks/tmux-bind.fish +++ b/tests/checks/tmux-bind.fish @@ -11,7 +11,6 @@ isolated-tmux capture-pane -p # CHECK: echo abcde isolated-tmux send-keys C-c -tmux-sleep isolated-tmux send-keys C-l isolated-tmux send-keys begin Enter 'echo 1' Enter e n d C-p 23 tmux-sleep @@ -22,10 +21,17 @@ isolated-tmux capture-pane -p # regression test isolated-tmux send-keys C-c # not sure why we need to wait after this -tmux-sleep isolated-tmux send-keys 'bind S begin-selection' Enter C-l -tmux-sleep isolated-tmux send-keys 'echo one two threeS' C-u C-y tmux-sleep isolated-tmux capture-pane -p # CHECK: prompt 1> echo one two three + +isolated-tmux send-keys "function prepend; commandline --cursor 0; commandline -i echo; end" Enter +isolated-tmux send-keys "bind ctrl-g prepend" Enter +isolated-tmux send-keys C-l +isolated-tmux send-keys 'printf' +isolated-tmux send-keys C-g Space +tmux-sleep +isolated-tmux capture-pane -p +# CHECK: prompt 2> echo printf diff --git a/tests/checks/tmux-bind2.fish b/tests/checks/tmux-bind2.fish deleted file mode 100644 index 9825a6cb09da..000000000000 --- a/tests/checks/tmux-bind2.fish +++ /dev/null @@ -1,13 +0,0 @@ -#RUN: %fish %s -#REQUIRES: command -v tmux - -isolated-tmux-start - -isolated-tmux send-keys "function prepend; commandline --cursor 0; commandline -i echo; end" Enter -isolated-tmux send-keys "bind ctrl-g prepend" Enter -isolated-tmux send-keys C-l -isolated-tmux send-keys 'printf' -isolated-tmux send-keys C-g Space -tmux-sleep -isolated-tmux capture-pane -p -# CHECK: prompt 2> echo printf diff --git a/tests/checks/tmux-complete.fish b/tests/checks/tmux-complete.fish index 820af9619cef..edd28ddbe4f0 100644 --- a/tests/checks/tmux-complete.fish +++ b/tests/checks/tmux-complete.fish @@ -46,7 +46,6 @@ isolated-tmux capture-pane -p | sed -n '1p;$p' # Canceling the pager removes the inserted completion, no matter what happens in the search field. # The common prefix remains because it is inserted before the pager is shown. isolated-tmux send-keys C-c -tmux-sleep isolated-tmux send-keys C-l foo2 Space BTab b BSpace b Escape tmux-sleep isolated-tmux capture-pane -p @@ -54,7 +53,6 @@ isolated-tmux capture-pane -p # Check that down-or-search works even when the pager is not selected. isolated-tmux send-keys C-u foo2 Space Tab -tmux-sleep isolated-tmux send-keys Down tmux-sleep isolated-tmux capture-pane -p @@ -79,7 +77,6 @@ isolated-tmux capture-pane -p # CHECK: prompt 5> foo2 aabc old-arg isolated-tmux send-keys C-u 'echo suggest this' Enter C-l -tmux-sleep isolated-tmux send-keys 'echo sug' C-w C-z tmux-sleep isolated-tmux capture-pane -p @@ -87,9 +84,7 @@ isolated-tmux capture-pane -p isolated-tmux send-keys C-u 'bind ctrl-s forward-single-char' Enter C-l isolated-tmux send-keys 'echo suggest thi' -tmux-sleep isolated-tmux send-keys C-s -tmux-sleep isolated-tmux send-keys C-s tmux-sleep isolated-tmux capture-pane -p @@ -97,7 +92,6 @@ isolated-tmux capture-pane -p isolated-tmux send-keys C-u isolated-tmux send-keys 'echo sugg' C-a -tmux-sleep isolated-tmux send-keys C-e M-f Space nothing tmux-sleep isolated-tmux capture-pane -p @@ -106,13 +100,18 @@ isolated-tmux capture-pane -p isolated-tmux send-keys C-u 'bind \cs forward-char-passive' Enter C-l isolated-tmux send-keys C-u 'bind \cb backward-char-passive' Enter C-l isolated-tmux send-keys C-u 'echo do not accept this' Enter C-l -tmux-sleep isolated-tmux send-keys 'echo do not accept thi' C-b C-b DC C-b C-s 'h' -tmux-sleep isolated-tmux send-keys C-s C-s C-s 'x' +tmux-sleep isolated-tmux capture-pane -p # CHECK: prompt 10> echo do not accept thix isolated-tmux send-keys C-u C-l ': {*,' Tab Tab Space , tmux-sleep isolated-tmux capture-pane -p # CHECK: prompt 10> : {*,cmake/ ,{{.*}} + +isolated-tmux send-keys 'touch ~/"path with spaces"' Enter C-l \ + 'cat ~/space' Tab +tmux-sleep +isolated-tmux capture-pane -p +# CHECK: prompt 11> cat ~/path\ with\ spaces diff --git a/tests/checks/tmux-complete2.fish b/tests/checks/tmux-complete2.fish deleted file mode 100644 index 5ef0ea118723..000000000000 --- a/tests/checks/tmux-complete2.fish +++ /dev/null @@ -1,13 +0,0 @@ -#RUN: %fish %s -#REQUIRES: command -v tmux -#REQUIRES: uname -r | grep -qv Microsoft -# cautiously disable because tmux-complete.fish is disabled -#REQUIRES: test -z "$CI" - -isolated-tmux-start - -isolated-tmux send-keys 'touch ~/"path with spaces"' Enter C-l \ - 'cat ~/space' Tab -tmux-sleep -isolated-tmux capture-pane -p -# CHECK: prompt 1> cat ~/path\ with\ spaces diff --git a/tests/checks/tmux-history-search.fish b/tests/checks/tmux-history-search.fish index 030346f5c5ab..7ca41276d14a 100644 --- a/tests/checks/tmux-history-search.fish +++ b/tests/checks/tmux-history-search.fish @@ -13,10 +13,8 @@ isolated-tmux-start isolated-tmux send-keys 'true needle' Enter # CHECK: prompt 0> true needle -tmux-sleep isolated-tmux send-keys 'true hay ee hay' Enter # CHECK: prompt 1> true hay ee hay -tmux-sleep isolated-tmux send-keys C-p C-a M-f M-f M-f M-. # CHECK: prompt 2> true hay needle hay tmux-sleep @@ -33,9 +31,9 @@ isolated-tmux capture-pane -p | grep 'prompt 2' # When history pager fails to find a result, copy the search field to the command line. isolated-tmux send-keys C-e C-u C-r "echo no such command in history" -tmux-sleep isolated-tmux send-keys Enter # CHECK: prompt 2> echo no such command in history +tmux-sleep isolated-tmux capture-pane -p | grep 'prompt 2' isolated-tmux send-keys C-c @@ -43,6 +41,7 @@ isolated-tmux send-keys C-r hay/shmay isolated-tmux send-keys C-w C-h isolated-tmux send-keys Enter # CHECK: prompt 2> true hay ee hay +tmux-sleep isolated-tmux capture-pane -p | grep 'prompt 2>' isolated-tmux send-keys C-c @@ -52,7 +51,6 @@ tmux-sleep isolated-tmux capture-pane -p #CHECK: prompt 5> echo 2 isolated-tmux send-keys C-c -tmux-sleep isolated-tmux send-keys "echo sdifjsdoifjsdoifj" Enter tmux-sleep @@ -60,9 +58,7 @@ isolated-tmux capture-pane -p | grep "^sdifjsdoifjsdoifj\|prompt 6>" # CHECK: sdifjsdoifjsdoifj # CHECK: prompt 6> isolated-tmux send-keys C-e C-u C-r -tmux-sleep isolated-tmux send-keys "echo sdifjsdoifjsdoifj" -tmux-sleep isolated-tmux send-keys M-d # alt-d tmux-sleep isolated-tmux capture-pane -p | grep "(no matches)" diff --git a/tests/checks/tmux-job.fish b/tests/checks/tmux-job.fish index 25b9a72a664b..ca8f717e3d74 100644 --- a/tests/checks/tmux-job.fish +++ b/tests/checks/tmux-job.fish @@ -5,12 +5,10 @@ isolated-tmux-start isolated-tmux send-keys \ "sleep 0.5 &" Enter -sleep 0.1 isolated-tmux send-keys \ "echo hello" -sleep 0.6 isolated-tmux send-keys Space world -sleep 0.1 +tmux-sleep isolated-tmux capture-pane -p # CHECK: prompt 0> sleep 0.5 & # CHECK: prompt 0> echo hello diff --git a/tests/checks/tmux-transient.fish b/tests/checks/tmux-transient.fish index c595fbe60152..d04d633aba0f 100644 --- a/tests/checks/tmux-transient.fish +++ b/tests/checks/tmux-transient.fish @@ -14,6 +14,7 @@ set -g isolated_tmux_fish_extra_args -C ' ' isolated-tmux-start +tmux-sleep isolated-tmux send-keys 'echo foo' Enter tmux-sleep