Commit Graph

53 Commits

Author SHA1 Message Date
Kovid Goyal
da31d21ddb
Port the shell integration tests to use the run-shell kitten 2023-06-26 16:53:08 +05:30
Kovid Goyal
7fe5d7b58f
Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
51bba9110e
Bash integration: Fix clone-in-kitty not working on bash >= 5.2 if environment variable values contain newlines or other special characters
Bash >= 5.2 changed the export command to output values using $' escaping when they contain special characters.
Fixes #5629
2022-11-22 16:38:24 +05:30
Kovid Goyal
1559a2e15a
Cleanup previous PR 2022-09-05 21:19:58 +05:30
James McCoy
f0d497dfe0
Skip bash shell_integration tests if bash is a debug build
Switch to using BASH_VERSINFO rather than BASH_VERSION, since it
provides structured data.

    BASH_VERSINFO
           A readonly array variable whose members hold version information for this instance of bash.  The values assigned to the array members are as follows:
           BASH_VERSINFO[0]        The major version number (the release).
           BASH_VERSINFO[1]        The minor version number (the version).
           BASH_VERSINFO[2]        The patch level.
           BASH_VERSINFO[3]        The build version.
           BASH_VERSINFO[4]        The release status (e.g., beta1).
           BASH_VERSINFO[5]        The value of MACHTYPE.

When release status is not "release", bash builds are in debug mode and
output extra information which disturbs the integration.

Closes #5473
2022-09-05 11:37:37 -04:00
Kovid Goyal
c455fea729
Also output screen contents when test fails 2022-09-05 07:52:36 +05:30
Kovid Goyal
16da031f68
Wait till prompt appears before issuing clear 2022-08-28 21:54:55 +05:30
Kovid Goyal
43b2935e52
Make fish shell integration test for XDG_DATA_DIRS work even if the shells rc files add to XDG_DATA_DIRS.
My Linux distro has now started installing system wide rc files that do
this :((
2022-08-28 21:15:26 +05:30
Kovid Goyal
21eece4c6d
Ensure no bytecode is written when running shell based tests 2022-08-08 17:50:59 +05:30
Kovid Goyal
d6492264c7
Bash integration: Fix declare not creating global variables in .bashrc
Fixes #5254
2022-07-08 18:55:04 +05:30
Kovid Goyal
6405849a1b
Bash integration clone test was accidentally running zsh
Fixes #5144
2022-05-29 08:46:06 +05:30
Kovid Goyal
e71b9091a3
Dont rely on env -0 for bash either 2022-04-15 13:33:32 +05:30
Kovid Goyal
b866c3e783
Add a zsh test for clone env serialization 2022-04-15 12:04:50 +05:30
pagedown
7160027c14
Use the fish built-in function name to report current working directory
If the feature is enabled by fish in the future, it will override the
built-in one and there will be no duplicate reporting.
2022-03-16 01:03:26 +08:00
Kovid Goyal
c95dca4023
See if we can make the test more robust 2022-03-15 20:38:02 +05:30
Kovid Goyal
47b3c37bf0
Add cwd reporting to fish integration 2022-03-15 20:25:39 +05:30
Kovid Goyal
190666dc8a
Check that non-ascii paths work in cwd reporting 2022-03-15 20:16:09 +05:30
Kovid Goyal
f982e754e4
Enable CWD reporting in bash integration 2022-03-15 15:37:17 +05:30
Kovid Goyal
4a1ad7755a
Enable CWD reporting in the zsh integration 2022-03-15 14:30:21 +05:30
pagedown
1b68e41db4
Remove the fish integration prompt end B prompt marking
Currently kitty does not use the B prompt marking.
This is consistent with the zsh and bash implementations.
Improve compatibility with most user configurations.
2022-03-07 12:12:52 +08:00
pagedown
7c166e2194
Try to make the fish vi cursor test more stable 2022-03-04 23:46:39 +08:00
pagedown
d236b34fd4
Shell integration: Fix running bash non-interactively
In POSIX mode, bash does not perform ENV with non-interactive shell, so
the mode cannot be recovered. Check the arguments and do not change the
execution environment.
2022-03-04 19:47:44 +08:00
Kovid Goyal
4279f20daf
Dont depend on the default bash prompt when testing 2022-03-03 21:24:42 +05:30
Kovid Goyal
d8ed42ae8e
Move setting of ZLE_RPROMPT_INDENT to zshrc which will hopefully prevent it being overriden 2022-03-03 19:16:44 +05:30
Kovid Goyal
297592242c
Fix #4782
Presumably the failure is caused by zsh not having finished drawing the
prompt when the cursor shape is changed. So instead wait till the
expected prompt is drawn. There are probably more places where this
change needs to be made, which I cant tell since I cant reproduce.
2022-03-03 17:22:42 +05:30
Kovid Goyal
e103b280fd
Add test for HISTFILE 2022-02-28 20:09:54 +05:30
pagedown
2d4f7e3446
Disable system startup files in zsh integration test with --noglobalrcs 2022-02-27 20:21:05 +08:00
Kovid Goyal
165c1240a9
Make the test a little more robust 2022-02-27 11:04:12 +05:30
Kovid Goyal
f91463a494
Also add test for handling of control chars in zsh title reporting 2022-02-27 10:47:23 +05:30
Kovid Goyal
d53f8f24c4
Fix #4757
Still have to do the fix for zsh/fish
2022-02-27 10:20:19 +05:30
pagedown
e2f16ff624
Add fish pipestatus integration tests and changelog entries 2022-02-27 00:27:31 +08:00
Kovid Goyal
8278e2b88d
Dont fail test in no PATH in environ 2022-02-23 23:27:24 +05:30
Kovid Goyal
12e011c481
Merge branch 'test-ksi-fish' of https://github.com/page-down/kitty 2022-02-23 18:31:13 +05:30
Kovid Goyal
668783ba1c
Use a version check when skipping bash test 2022-02-23 18:27:20 +05:30
pagedown
c18ebef702
... 2022-02-23 20:49:32 +08:00
pagedown
9c05481f14
... 2022-02-23 20:05:30 +08:00
pagedown
c0f6201ac3
Add fish shell integration tests 2022-02-23 19:55:19 +08:00
Kovid Goyal
fc9645832d
Add tests for --noprofile, --rcfile, --norc as well 2022-02-23 10:42:25 +05:30
Kovid Goyal
c47f41cfc0
Add tests for bash startup file sourcing 2022-02-23 08:35:24 +05:30
Kovid Goyal
e28aae620a
Add tests for reset of cursor shape when running commands 2022-02-23 07:48:42 +05:30
Kovid Goyal
88091b4ab3
BASH integration: No longer modify .bashrc to load shell integration
I think I have things setup robustly so that the shell integration
is loaded transparently via env vars and the normal bash startup files
are sourced, in the same way that vanilla bash does it. Let's hope I
haven't overlooked something.
2022-02-22 21:24:51 +05:30
Kovid Goyal
4487462b0d
bash assumes ECHO is enabled for the tty 2022-02-22 20:43:58 +05:30
Kovid Goyal
dac9b07f16
bash shell integration: Handle both literal and escaped newlines in PS1 2022-02-22 18:30:20 +05:30
Kovid Goyal
b59212696a
Skip testing bash on macOS as it is too old 2022-02-22 14:53:46 +05:30
Kovid Goyal
e25b90c1b6
Add bash integration tests 2022-02-22 12:23:19 +05:30
Kovid Goyal
65c7ecbc30
Test prompt drawing after screen is shrunk 2022-02-21 21:17:52 +05:30
Kovid Goyal
da5e37620e
Also test changing of title when running command 2022-02-21 21:17:52 +05:30
Kovid Goyal
261057396c
Fix zsh integration test on CI
Also, add various other robustness improvements to the test
2022-02-21 21:17:41 +05:30
Kovid Goyal
a43f610555
Better error msg when cursor is not changed 2022-02-21 18:23:35 +05:30
Kovid Goyal
45ae52e5d0
Fix assert ordering 2022-02-21 18:07:54 +05:30