fish-shell/tests/pexpects
Fabian Boehm e66f6878b5 Make tests usable with path with spaces
This is somewhat subtle:

The #RUN line in a littlecheck file will be run by a posix shell,
which means the substitutions will also be mangled by it.

Now, we *have* shell-quoted them, but unfortunately what we need is to
quote them for inside a pre-existing layer of quotes, e.g.

    # RUN: fish -C 'set -g fish %fish'

here, %fish can't be replaced with `'path with spaces/fish'`, because
that ends up as

    # RUN: fish -C 'set -g fish 'path with spaces/fish''

which is just broken.

So instead, we pass it as a variable to that fish:

    # RUN: fish=%fish fish...

In addition, we need to not mangle the arguments in our test_driver.

For that, because we insist on posix shell, which has only one array,
and we source a file, we *need* to stop having that file use
arguments.

Which is okay - test_env.sh could previously be used to start a test,
and now it no longer can because that is test_*driver*.sh's job.

For the interactive tests, it's slightly different:

pexpect.spawn(foo) is sensitive to shell metacharacters like space.

So we shell-quote it.

But if you pass any args to pexpect.spawn, it no longer uses a shell,
and so we cannot shell-quote it.

There could be a better way to fix this?
2025-01-01 16:45:43 +01:00
..
abbrs.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00
bind.py ctrl-l to scroll content instead of erasing screen 2024-12-30 10:50:38 +01:00
bind_mode_events.py On undo after execute, restore the cursor position 2024-12-21 13:10:34 +01:00
cancel_event.py Control-C to simply clear commandline buffer again 2024-01-17 19:54:57 +01:00
commandline.py pexpects: Fix some escapes 2024-12-27 20:05:10 +01:00
complete-group-order.py pexpects: Fix some escapes 2024-12-27 20:05:10 +01:00
complete.py On undo after execute, restore the cursor position 2024-12-21 13:10:34 +01:00
cursor_selection.py Restyle fishscript and python 2023-06-01 18:20:19 +02:00
disable_mouse.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00
eval-stack-overflow.py pexpects: Fix some escapes 2024-12-27 20:05:10 +01:00
exit.py pexpects: Disable exit on CI Darwin/FreeBSD 2024-12-15 17:33:12 +01:00
exit_handlers.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00
exit_nohang.py tests: Specifically #require fish_test_helper when needed 2025-01-01 16:45:43 +01:00
fg.py tests: Specifically #require fish_test_helper when needed 2025-01-01 16:45:43 +01:00
fkr.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00
generic.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00
histfile.py Fix the histfile.py test 2024-06-02 15:31:19 -07:00
history.py pexpects: Fix some escapes 2024-12-27 20:05:10 +01:00
isatty.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00
job_summary.py tests/pexpect: Fix \d escape 2024-04-02 22:41:54 +02:00
nullterm.py Be careful to not touch curses variables if cur_term is null 2022-04-16 13:26:56 -07:00
pipeline.py tests: Specifically #require fish_test_helper when needed 2025-01-01 16:45:43 +01:00
postexec.py Reformat 2020-11-22 14:39:48 +01:00
private_mode.py Make tests usable with path with spaces 2025-01-01 16:45:43 +01:00
prompt_redraw_loop.py Fix infinite prompt loop if status message is printed in prompt 2024-12-08 18:12:59 -08:00
read.py On undo after execute, restore the cursor position 2024-12-21 13:10:34 +01:00
set_color.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00
sigint.py Add missing expect_prompt to test_sigint.py 2024-01-07 00:54:22 +01:00
signals.py One more FreeBSD-only-in-CI 2024-12-15 17:38:37 +01:00
status.py On undo after execute, restore the cursor position 2024-12-21 13:10:34 +01:00
stdin_nonblocking.py tests: Specifically #require fish_test_helper when needed 2025-01-01 16:45:43 +01:00
terminal.py Disable terminal protocols throughout evaluation 2024-04-02 21:25:47 +02:00
torn_escapes.py pexpects: Disable 2 only on CI 2024-12-15 17:32:47 +01:00
tty_ownership.py Claim the tty unconditionally in reader_data_t::readline 2022-09-09 13:43:29 -07:00
undo.py Fix the undo pexpect 2024-06-02 14:17:36 -07:00
wait.py share/config.fish: Quit if job expansion hack errors 2023-06-10 15:36:36 +02:00
wildcard_tab.py Remove some unused code from the tests 2024-12-08 13:57:10 -08:00