Commit graph

1124 commits

Author SHA1 Message Date
Kovid Goyal
e7d6101bd4
DRYer 2024-02-25 09:57:44 +05:30
Kovid Goyal
76381f5cdd
Another tdir rmtree failure during tear down ignored 2024-02-25 09:57:44 +05:30
Kovid Goyal
40a4429e58
Ignore failure to remove tempdir during test tear down 2024-02-25 09:57:44 +05:30
Kovid Goyal
4caf8a6b14
Restore support for alternate character sets
Needed by the execrable ncurses. Adds an extra branch in the hot path,
sigh. Thanks to branch prediction it doesnt have any measurable impact
on the benchmark, thankfully.
2024-02-25 09:57:44 +05:30
Kovid Goyal
c19488f3be
Graphics protocol: Add a new delete mode for deleting images whose ids fall within a range
Useful for bulk deletion. See #7080
2024-02-25 09:57:44 +05:30
Kovid Goyal
ad3ab877f8
Use a fast SIMD implementation to XOR data going into the disk cache 2024-02-25 09:57:43 +05:30
Kovid Goyal
de92470f0d
Improve performance of disk cache when there are thousands of small images
Fixes #7080
2024-02-25 09:57:43 +05:30
Kovid Goyal
b65a5f78fd
Fix regression causing shells in darwin to not run in login mode 2024-02-25 09:57:43 +05:30
Kovid Goyal
e541c0534d
... 2024-02-25 09:57:42 +05:30
Kovid Goyal
41ec46d5bb
... 2024-02-25 09:57:42 +05:30
Kovid Goyal
b021e9b648
Do the default func test last so we can see what the failure is on more explicitly 2024-02-25 09:57:42 +05:30
Kovid Goyal
d0797a025b
Add dedicated tests for find_either_of_two 2024-02-25 09:57:42 +05:30
Kovid Goyal
f64739c29b
Fix regression that broke handling of single byte control chars when cursor is on second cell of wide character 2024-02-25 09:57:41 +05:30
Kovid Goyal
6cdc7ac91d
A further 5% speedup for UTF-8 decoding
Achieved by decoding in larger chunks thereby amortizing the cost
of creating various constant vectors over larger chunks.
2024-02-25 09:57:40 +05:30
Kovid Goyal
fa11858a72
Make bash integration tests more robust on macOS 2024-02-25 09:57:38 +05:30
Kovid Goyal
dafb876d75
Skip simd parser tests on machines without SIMD instructions 2024-02-25 09:57:38 +05:30
Kovid Goyal
b0ccaa09be
Clean up test env reporting 2024-02-25 09:57:37 +05:30
Kovid Goyal
bbaccfdaae
DRYer 2024-02-25 09:57:37 +05:30
Kovid Goyal
616fcfd201
More tests 2024-02-25 09:57:35 +05:30
Kovid Goyal
b3ca5d51fb
Use the new SIMD utf-8 decoder 2024-02-25 09:57:35 +05:30
Kovid Goyal
e783eccc97
fix handling of bits from high byte of 4 byte sequences 2024-02-25 09:57:35 +05:30
Kovid Goyal
fa3579656b
More invalid utf-8 tests 2024-02-25 09:57:34 +05:30
Kovid Goyal
8a10fcaf5a
More tests 2024-02-25 09:57:34 +05:30
Kovid Goyal
4c8b8caead
Handle trailing incomplete sequences 2024-02-25 09:57:34 +05:30
Kovid Goyal
4238fedee7
More tests 2024-02-25 09:57:34 +05:30
Kovid Goyal
b0dcdf74bd
More tests and micro-optimize switch to ASCII fast path 2024-02-25 09:57:34 +05:30
Kovid Goyal
b28fbf6817
fix zero-ing of last n bytes 2024-02-25 09:57:34 +05:30
Kovid Goyal
daa169b8ed
More work on utf8 SIMD decode 2024-02-25 09:57:34 +05:30
Kovid Goyal
b146e9c457
Add basic parser tests for pending mode activation/de-activation 2024-02-25 09:57:32 +05:30
Kovid Goyal
1f835b27c4
start work on implementing pending mode as paused rendering 2024-02-25 09:57:32 +05:30
Kovid Goyal
e52bcb5b93
more workon simd utf-8 decode 2024-02-25 09:57:31 +05:30
Kovid Goyal
74391d7c50
More work on SIMD utf-8 decode 2024-02-25 09:57:31 +05:30
Kovid Goyal
0ed1c6f840
Simplify utf8 parser func
Also show a replacement char for incomplete utf-8 sequences interrupted by an esc char
2024-02-25 09:57:31 +05:30
Kovid Goyal
1b11c3e923
Double timeouts on flaky test 2024-02-25 09:57:30 +05:30
Kovid Goyal
8742fb8cce
Detect availability of intrinsics on intel macs just in case 2024-02-25 09:57:30 +05:30
Kovid Goyal
a9f5519d11
Add tests for writing with cursor on trailer of wide char 2024-02-25 09:57:30 +05:30
Kovid Goyal
c5f0b03a62
Remove not needed function 2024-02-25 09:57:29 +05:30
Kovid Goyal
8dca5a6b9a
... 2024-02-25 09:57:26 +05:30
Kovid Goyal
200e5bf6e3
Examine 8 bytes at once for terminator char 2024-02-25 09:57:26 +05:30
Kovid Goyal
409ca6bfab
Allow larger graphics escape code sizes 2024-02-25 09:57:25 +05:30
Kovid Goyal
65aca5b140
Speedup utoi by loading numbers in 8 byte chunks 2024-02-25 09:57:24 +05:30
Kovid Goyal
e7c466797c
threading test for full buffer 2024-02-25 09:57:24 +05:30
Kovid Goyal
c66c0b8edc
threading tests for pending 2024-02-25 09:57:24 +05:30
Kovid Goyal
50935b6c93
Cleanup kitty dcs parsing 2024-02-25 09:57:24 +05:30
Kovid Goyal
8bff6f1995
More threading tests 2024-02-25 09:57:24 +05:30
Kovid Goyal
9f337e93fc
Add some threading tests 2024-02-25 09:57:24 +05:30
Kovid Goyal
72635c55c5
Convenience methods to test parser threading 2024-02-25 09:57:24 +05:30
Kovid Goyal
93784903b2
Remove FLUSH_DRAW as it is not needed 2024-02-25 09:57:24 +05:30
Kovid Goyal
afcffc03b1
Separate test of write and read so we can test threading 2024-02-25 09:57:24 +05:30
Kovid Goyal
6205fb32fd
Refactor VT parser for more speed
No longer copy bytes into a separate buffer, instead parse them in place
in the read buffer
2024-02-25 09:57:23 +05:30
Kovid Goyal
23bb2e1b67
Fast function to replace c0 codes 2024-02-25 09:57:23 +05:30
Kovid Goyal
c81ac668da
Use a single code path for tests and live VT parsing 2024-02-25 09:57:23 +05:30
Kovid Goyal
f42b49e597
Avoid a double parse for pending mode 2024-02-25 09:57:23 +05:30
Kovid Goyal
969bd05fc5
Represent malformed UTF-8 with the replacement character 2024-02-25 09:57:23 +05:30
Kovid Goyal
8a83014f51
Dont construct memoryview when not needed in non dump code path 2024-02-25 09:57:23 +05:30
Kovid Goyal
76158f39ba
Pass the window id to the dump calback 2024-02-25 09:57:23 +05:30
Kovid Goyal
065866895c
Get pending mode working and add a few more tests 2024-02-25 09:57:23 +05:30
Kovid Goyal
52025ff030
misc parser and test fixes 2024-02-25 09:57:22 +05:30
Kovid Goyal
5168e0b576
Port parse_bytes() used in the tests 2024-02-25 09:57:22 +05:30
Kovid Goyal
e4bb00d942
Implement UTF-8 decoding for screen_draw() 2024-02-25 09:57:22 +05:30
Kovid Goyal
5f809bf249
Get kitty building with the new VT parser 2024-02-25 09:57:22 +05:30
Kovid Goyal
b2391553f9
Keyboard protocol: Fix the Enter Tab and Backspace keys generating spurious release events even when report all keys as escape codes is not set
Fixes #7136
2024-02-18 11:12:24 +05:30
Kovid Goyal
8cc2cad4d9
Use list of legal chars in URL from the WHATWG standard
Notably this excludes some ASCII chars: <>{}[]`|
See https://url.spec.whatwg.org/#url-code-points

Fixes #7095
2024-02-05 13:27:22 +05:30
Kovid Goyal
5a2ee2f9a3
macOS: Fix kitten @ select-window leaving the keyboard in a partially functional state
Fixes #7074
2024-01-27 12:53:58 +05:30
Kovid Goyal
4c46d2bc95
... 2024-01-26 20:07:55 +05:30
Kovid Goyal
c95fc3689b
A single multi-key mapping should not prematurely complete as that confuses people trying out the feature
See #7073
2024-01-26 20:04:33 +05:30
Kovid Goyal
8c50632a10
Fix a single key mapping not overriding a previously defined multi-key mapping 2024-01-26 18:02:25 +05:30
Kovid Goyal
ae1bf69a3d
Fix date in changelog 2024-01-26 17:24:45 +05:30
Kovid Goyal
4dfbcb539f
Add basic tests for modal mappings 2024-01-25 14:42:27 +05:30
Kovid Goyal
d6e55f72c0
Forgot to stub out one method for the test 2024-01-25 14:18:09 +05:30
Kovid Goyal
cd30de3727
Fix #7055 2024-01-25 14:06:52 +05:30
Kovid Goyal
cec427777c
Add some tests for mappings 2024-01-25 13:56:42 +05:30
Kovid Goyal
715548b144
Make test robust against wezterm's system wide shell integration
Not only is it system wide but it runs by default, even outside wezterm,
sigh.
2024-01-18 12:52:54 +05:30
Kovid Goyal
b0ba4b4a42
Fast and robust implementation of shlex.split
Also returns position of words in src string which we will need for
keymap parsing.
2023-12-02 14:57:02 +05:30
Kovid Goyal
53980d00f0
a couple more tests 2023-12-01 18:16:22 +05:30
Kovid Goyal
165f1ccfd1
Port the test 2023-11-30 20:06:20 +05:30
Kovid Goyal
716bf714db
Fix a couple of tests 2023-11-30 11:53:09 +05:30
Kovid Goyal
69e3e5c727
Use a boolean rather than an int 2023-11-14 16:35:01 +05:30
Kovid Goyal
77292a16d6
Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
77140fc798
Fix #6803 2023-11-10 08:49:33 +05:30
Kovid Goyal
52d5a4679f
Graphics protocol: Support for positioning images relative to other images
Fixes #6617
2023-10-27 15:27:30 +05:30
Kovid Goyal
defa2e29ac
Always ask for confirmation when pasting text with control codes in it 2023-10-20 13:02:28 +05:30
Kovid Goyal
56963c693e
When pasting in bracketed paste mode and the cursor is at a shell prompt, strip out C0 control codes
Some shells incorrectly interpret these allowing escape from bracketed paste mode. Thanks to David Leadbetter for discovering.
2023-10-20 12:17:13 +05:30
Kovid Goyal
4b997a961c
A new option single_window_padding_width to use a different padding when only a single window is visible
Fixes #6734
2023-10-20 08:37:45 +05:30
Kovid Goyal
5d5bbe9b96
Add a paragraph on legacy xterm compat for pointer shapes 2023-10-15 21:59:04 +05:30
Kovid Goyal
1693107608
A new escape code to change the shape of the mouse pointer
Fixes #6711
2023-10-15 19:57:36 +05:30
Kovid Goyal
1f91250a40
Fix trailing bracket not ignored when detecting a multi-line URL with the trailing bracket as the first character on the last line
Fixes #6710
2023-10-13 10:44:58 +05:30
Kovid Goyal
455d0a6048
Dont show hidden sub-commands during completion 2023-10-10 05:41:27 +05:30
Kovid Goyal
13bdb2035c
Merge branch 'pr-fix-reset' of https://github.com/sergei-grechanik/kitty 2023-09-04 07:34:12 +05:30
Sergei Grechanik
63cc5d7e49 Fix erasure of unicode placeholder images on reset 2023-09-03 15:33:30 -07:00
Jake Stewart
6354ef4cee add tests for python config parser 2023-09-03 16:37:59 +08:00
Kovid Goyal
951951776a
Ensure group_count is never zero in any ImageRef
Now group_count means the number of refs pointing to the same image from
that ref onwards. This is needed because we can index the list of refs
at any point when drawing not just at the start of a group.

Fixes #6594
2023-09-02 12:48:44 +05:30
Kovid Goyal
93bb6680c5
flush after run_cli, more logical 2023-08-07 12:37:27 +05:30
Kovid Goyal
1347d1ad47
Let go tests run without blocking on stdio 2023-08-07 10:56:39 +05:30
Kovid Goyal
d6187b5bfc
... 2023-08-07 10:25:20 +05:30
Kovid Goyal
16132d0309
Fix stdio not actually being forwarded 2023-08-05 13:24:25 +05:30
Kovid Goyal
e2915601a4
More robust stdio forwarding in tests 2023-08-05 11:37:39 +05:30
Kovid Goyal
bc4d7f4cb1
Get stdio forwarding working in the PTY tests 2023-08-05 10:47:29 +05:30
Kovid Goyal
88beb58838
Prevent go test output being interleaved with python 2023-08-05 10:15:08 +05:30
Kovid Goyal
395e47cc9e
CI is even slower than I thought 2023-08-04 07:36:36 +05:30
Kovid Goyal
a74e93d241
Increase timeout for child exit on CI 2023-07-30 19:49:48 +05:30
Kovid Goyal
c11d1d3430
Add more integration testing for the transfer kitten 2023-07-30 19:49:47 +05:30
Kovid Goyal
47913a7c1f
Tests for normal mode home dir expansion 2023-07-30 19:49:47 +05:30
Kovid Goyal
995c447435
Get the multi file tests working for the receive kitten 2023-07-30 19:49:47 +05:30
Kovid Goyal
5578e34da8
... 2023-07-30 19:49:47 +05:30
Kovid Goyal
a30687125c
Start on tests for receive kitten 2023-07-30 19:49:47 +05:30
Kovid Goyal
2cae0ab695
Dont wait for cancel response when user denies permission 2023-07-30 19:49:46 +05:30
Kovid Goyal
bb897fa299
Ignore directory mtimes when testing
They are flaky on CI for some reason
2023-07-30 19:49:46 +05:30
Kovid Goyal
eecf24b986
Fix registering of mtimes 2023-07-30 19:49:44 +05:30
Kovid Goyal
e60fef3ba1
More tests for send kitten 2023-07-30 19:49:44 +05:30
Kovid Goyal
346a651a48
Add option to control compression modes 2023-07-30 19:49:44 +05:30
Kovid Goyal
84c680266a
Dont check exitcode on ancient python 2023-07-30 19:49:44 +05:30
Kovid Goyal
350af446d3
More tests 2023-07-30 19:49:44 +05:30
Kovid Goyal
39f7f2d7b4
Cant flush response in a parser callback as it can cause recursive parsing 2023-07-30 19:49:44 +05:30
Kovid Goyal
34dfd1881f
Update docs on what is needed for the transfer kitten 2023-07-30 19:49:44 +05:30
Kovid Goyal
15978c9c60
Infrastructure for testing the transfer kitten 2023-07-30 19:49:43 +05:30
Kovid Goyal
42edfa6a47
Prevent ruff from failing because of to be ported test 2023-07-30 19:49:43 +05:30
Kovid Goyal
86a1a40d1d
remove unused code 2023-07-30 19:49:43 +05:30
Kovid Goyal
edc1669ced
Ported tests all pass 2023-07-30 19:49:43 +05:30
Kovid Goyal
bbbc33d4dc
... 2023-07-30 19:49:43 +05:30
Kovid Goyal
b03fa08884
... 2023-07-30 19:49:43 +05:30
Kovid Goyal
9a5b3a7315
Start work on porting rsync roundtrip tests 2023-07-30 19:49:43 +05:30
Kovid Goyal
c84874ca8d
Add tests for the xxhash based hashers 2023-07-30 19:49:42 +05:30
Kovid Goyal
37d9a572ee
Restore a couple of needed functions to the rsync module 2023-07-30 19:49:42 +05:30
Kovid Goyal
25ed0c9c51
... 2023-07-30 19:49:38 +05:30
Kovid Goyal
b83e4d88f4
Implement fast padding-less base64 encode/decode for python 2023-07-30 19:49:38 +05:30
Kovid Goyal
6c79ae4443
Proper parsing of safe_string fields 2023-07-30 19:49:38 +05:30
Kovid Goyal
e05902e8ee
... 2023-07-30 19:49:38 +05:30
Kovid Goyal
55bbf175c6
Port send file mapping tests 2023-07-30 19:49:37 +05:30
Kovid Goyal
da31d21ddb
Port the shell integration tests to use the run-shell kitten 2023-06-26 16:53:08 +05:30
Kovid Goyal
098a38a3a9
Remove rendering via framebuffer for transparent windows with images
There is no need for it with the current rendering pipeline. Images are
blended with premult blending.
2023-06-21 16:06:07 +05:30
Kovid Goyal
af724090d2
Add a non-delete test as well 2023-06-14 09:44:51 +05:30
Kovid Goyal
80fb6f0f12
Merge branch 'master' of https://github.com/olzhasar/kitty 2023-06-14 08:08:51 +05:30
Kovid Goyal
4c5f4c4baf
Apparently Python 3.12 no longer raises FileNotFoundError when closing a deleted file
Fixes #6360 (I hope) dont have time to actually test with pre-release
python builds
2023-06-14 08:06:47 +05:30
olzhasar
d0a5d1b3a4 Fix misspellings 2023-06-14 03:39:53 +06:00
Kovid Goyal
9f377c5ccb
Cache shader source code loading 2023-06-13 17:58:17 +05:30
Kovid Goyal
750018e5fe
... 2023-05-25 12:25:46 +05:30
Kovid Goyal
cb936c1b5b
Use /dev/null rather than /dev/tty for the test 2023-05-25 12:24:59 +05:30
Kovid Goyal
624007c7aa
Refuse to read image files in /proc /sys and /dev
Also, open the image file with O_NONBLOCK to ensure we dont hang opening
a FIFO
2023-05-25 12:17:03 +05:30
Kovid Goyal
d059ddbb07
Only import resource module when actually running the test instead of at import time 2023-05-24 16:59:44 +05:30
Olivier Gayot
430768f38b Skip crypto test if RLIMIT_MEMLOCK is too low
On systems where the max locked memory (a.k.a., RLIMIT_MEMLOCK) is too
low, the crypto test fails with "Cannot allocate memory".

Distros such as Debian and Ubuntu run the test-suite as part of the
build process. This results in failed builds if the build machine itself
does not have a sufficiently high value for RLIMIT_MEMLOCK. That said,
the resulting builds would run perfectly fine when installed on machines
that meet the requirements.

On supported systems, we now check if the RLIMIT_MEMLOCK is high enough
and skip the crypto test if it is not.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-05-24 13:18:08 +02:00
Kovid Goyal
a2aadd4756
Remove python diff tests as no longer needed 2023-03-27 11:54:34 +05:30
Kovid Goyal
d30091034a
Remove the python diff kitten 2023-03-27 11:46:22 +05:30
Kovid Goyal
1bed92bed1
Cleanup previous PR 2023-03-20 07:42:10 +05:30
usertam
08fa7f19f7
kitty_tests, shell-integration: rework getpwuid() exceptions suppression 2023-03-20 03:31:23 +08:00
Samuel Tam
31319f0b65
kitty_tests/ssh.py: skip login shell detection if getpwuid() fails 2023-03-19 18:45:47 +08:00
Kovid Goyal
c19ac531cf
Fix some failing tests 2023-03-14 20:40:12 +05:30
Kovid Goyal
29dd2438c9
Port the subseq matcher to Go 2023-03-14 12:29:44 +05:30
Kovid Goyal
34cbf5ceac
Get rid of prewarming
Don't need it anymore since all major UI kittens are ported to Go
and so don't have startup latency.
2023-03-10 13:22:10 +05:30
Kovid Goyal
b76b0c61ed
Port custom processor for hints 2023-03-10 10:45:37 +05:30