mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
77c434bc42
This was long overdue since the setup logic is much more complex than the actual tests. tmux-prompt.fish had extra logic to protect against XDG_CONFIG_HOME with leading double double-dot. I believe this is no longer necessary with the new test driver. We still use our own temp dir because we want to be able to run this independently of the test driver, This can be useful for debugging tests. For example we can insert a "$tmux attach" command in a test, and then run build/fish -C 'source tests/test_functions/isolated-tmux.fish' tests/checks/tmux-bind.fish This allows to inspect the state of the test and debug interactively. Attaching to the terminal doesn't work when running inside littlecheck because littlecheck consumes our output and doesn't give us a terminal. (Maybe there's an easy way to fix that?)
9 lines
266 B
Fish
9 lines
266 B
Fish
#RUN: %fish %s
|
|
#REQUIRES: command -v tmux
|
|
|
|
# Test moving around with up-or-search on a multi-line commandline.
|
|
isolated-tmux send-keys 'echo 12' M-Enter 'echo ab' C-p 345 C-n cde
|
|
$sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 0> echo 12345
|
|
# CHECK: echo abcde
|