aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | vim-patch:9.0.1969: [security] buffer-overflow in trunc_string()zeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: buffer-overflow in trunc_string() Solution: Add NULL at end of buffer Currently trunc_string() assumes that when the string is too long, buf[e-1] will always be writeable. But that assumption may not always be true. The condition currently looks like this else if (e + 3 < buflen) [...] else { // can't fit in the "...", just truncate it buf[e - 1] = NUL; } but this means, we may run into the last else clause with e still being larger than buflen. So a buffer overflow occurs. So instead of using `buf[e - 1]`, let's just always truncate at `buf[buflen - 1]` which should always be writable. https://github.com/vim/vim/commit/3bd7fa12e146c6051490d048a4acbfba974eeb04 vim-patch:9.0.2004: Missing test file Problem: Missing test file Solution: git-add the file to the repo closes: vim/vim#13305 https://github.com/vim/vim/commit/d4afbdd0715c722cfc73d3a8ab9e578667615faa Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1882: Trailing white space in testszeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Trailing white space in tests Solution: Delete it This causes test_codestyle to fail, so we need to remove it again. Hopefully that makes the CI green again. Note: I will start using annotated tags from now on. https://github.com/vim/vim/commit/da200c2f78ef3c91557a2b484d284eb0c1c62776 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1881: Test_crash fails on Maczeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: Test_crash fails on Mac Solution: Skip test on Mac https://github.com/vim/vim/commit/5856b07795dff69e3bac57deb5033b5839c1dfb8 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1878: tests running sh have problemszeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | Problem: tests running sh have problems Solution: Check that dash is installed closes: vim/vim#13040 https://github.com/vim/vim/commit/1690ec64ffd784cddddb937870f5891adbb21986 Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com> Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1873: [security] heap-buffer-overflow in vim_regsub_bothzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | Problem: heap-buffer-overflow in vim_regsub_both Solution: Disallow exchanging windows when textlock is active https://github.com/vim/vim/commit/f6d28fe2c95c678cc3202cc5dc825a3fcc709e93 Cherry-pick test_crash.vim change from patch 9.0.1876. Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1872: CI: test_crash() fails on CIzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: CI: test_crash() fails on CI Solution: Skip test on BSD https://github.com/vim/vim/commit/d2a08ba0fa4a25f31cee9d9f33b0aa8237227387 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1868: test_crash still fails for circle cizeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: test_crash still fails for circle ci Solution: give even more time to complete https://github.com/vim/vim/commit/59adcb4c203371258c72e76011da93eac8540317 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1864: still crash with bt_quickfix1_poczeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: crash with bt_quickfix1_poc when cleaning up and EXITFREE is defined Solution: Test if buffer is valid in a window, else close window directly, don't try to access buffer properties While at it, increase the crash timeout slightly, so that CI has a chance to finish processing the test_crash() test. https://github.com/vim/vim/commit/623ba31821a41acee7e948794e84867680b97885 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1860: CI: test_crash1() is flakyzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: CI: test_crash1() is flaky Solution: Wait a bit longer https://github.com/vim/vim/commit/f44cbe96fa44d10d6dd717e0a9f6ef0f104ee98a Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:partial:9.0.1859: heap-use-after-free in bt_normal()zeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | Problem: heap-use-after-free in bt_normal() Solution: check that buffer is still valid https://github.com/vim/vim/commit/6e60cf444a8839ca1694319bf9a82e7b097e5c4d Test change only. Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1858: [security] heap use after free in ins_compl_get_exp()zeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: heap use after free in ins_compl_get_exp() Solution: validate buffer before accessing it https://github.com/vim/vim/commit/ee9166eb3b41846661a39b662dc7ebe8b5e15139 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1857: [security] heap-use-after-free in is_qf_win()zeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: heap-use-after-free in is_qf_win() Solution: Check buffer is valid before accessing it https://github.com/vim/vim/commit/fc68299d436cf87453e432daa77b6d545df4d7ed Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1854: test_crash1() fails on CIzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | Problem: test_crash1() fails on CI Solution: don't run Screendump test, verify that it doesn't crash by running it through a shell command line, testing the exit value and concatenating success cmd using '&&' https://github.com/vim/vim/commit/db510ca8052884fd260f425025bacf44f6c92fa9 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.2107: [security]: FPE in adjust_plines_for_skipcol (#26082)zeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: FPE in adjust_plines_for_skipcol Solution: don't divide by zero, return zero Prevent a floating point exception when calculating w_skipcol (which can happen with a small window when the number option is set and cpo+=n). Add a test to verify https://github.com/vim/vim/commit/cb0b99f0672d8446585d26e998343dceca17d1ce Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.2111: [security]: overflow in get_numberzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: overflow in get_number Solution: Return 0 when the count gets too large [security]: overflow in get_number When using the z= command, we may overflow the count with values larger than MAX_INT. So verify that we do not overflow and in case when an overflow is detected, simply return 0 https://github.com/vim/vim/commit/73b2d3790cad5694fc0ed0db2926e4220c48d968 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.2110: [security]: overflow in ex address parsingzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: overflow in ex address parsing Solution: Verify that lnum is positive, before substracting from LONG_MAX [security]: overflow in ex address parsing When parsing relative ex addresses one may unintentionally cause an overflow (because LONG_MAX - lnum will overflow for negative addresses). So verify that lnum is actually positive before doing the overflow check. https://github.com/vim/vim/commit/060623e4a3bc72b011e7cd92bedb3bfb64e06200 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.2109: [security]: overflow in nv_z_get_countzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: overflow in nv_z_get_count Solution: break out, if count is too large When getting the count for a normal z command, it may overflow for large counts given. So verify, that we can safely store the result in a long. https://github.com/vim/vim/commit/58f9befca1fa172068effad7f2ea5a9d6a7b0cca Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.2108: [security]: overflow with count for :s commandzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: overflow with count for :s command Solution: Abort the :s command if the count is too large If the count after the :s command is larger than what fits into a (signed) long variable, abort with e_value_too_large. Adds a test with INT_MAX as count and verify it correctly fails. It seems the return value on Windows using mingw compiler wraps around, so the initial test using :s/./b/9999999999999999999999999990 doesn't fail there, since the count is wrapping around several times and finally is no longer larger than 2147483647. So let's just use 2147483647 in the test, which hopefully will always cause a failure https://github.com/vim/vim/commit/ac63787734fda2e294e477af52b3bd601517fa78 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.0.1535: test commented out in a wrong wayzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: Test commented out in a wrong way. Solution: Use legacy script comment character. https://github.com/vim/vim/commit/a4467c433a767cc2dc046ff134094c1b6305b678 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.1534: test for expanding "~" in substitute takes too longzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: Test for expanding "~" in substitute takes too long. Solution: Disable the test for now. https://github.com/vim/vim/commit/916d6dd5b1834293e21a72ef70175aae57e78fba Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | vim-patch:9.0.1532: crash when expanding "~" in substitute causes very long textzeertzjq2023-11-17
| | | | | | | | | | | | | | | | | | Problem: Crash when expanding "~" in substitute causes very long text. Solution: Limit the text length to MAXCOL. https://github.com/vim/vim/commit/ab9a2d884b3a4abe319606ea95a5a6d6b01cd73a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | feat: add vim.text module (#26069)Gregory Anders2023-11-16
|/
* vim-patch:9.0.2105: skipcol not reset when topline changed (#26042)luukvbaal2023-11-15
| | | | | | | | Problem: Skipcol is not reset when topline changed scrolling cursor to top Solution: reset skipcol closes: vim/vim#13528 https://github.com/vim/vim/commit/bb800a7907209f7d349f87b76b3b9ca30b416298
* vim-patch:9.0.2104: wast filetype should be replaced by wat filetypeChristian Clason2023-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: wast filetype should be replaced by wat filetype Solution: start using the official wat filetype name runtime: rename `wast` filetype to `wat` (Wasm text format) The problem is the name of the current filetype wast. When the plugin was initially created, the file extension for Wasm text format was not fixed and .wast was more popular. However, recently .wat became the official file extension for WebAssembly text (WAT) format and .wast is now a file extension for the unofficial WAST format, which is a superset of .wat for the convenience to describe the Wasm specification conformance tests. https://webassembly.js.org/docs/contrib-wat-vs-wast.html However for now, let's keep using the `wat` filetype even for the .wast extension, so that we at least do not lose the filetype settings and syntax highlighting. This can be adjusted later, if it turns out to have a separate need for. closes: vim/vim#13533 https://github.com/vim/vim/commit/bc8f79d36a456054ed29f46585830af6d71f57c8 Co-authored-by: rhysd <lin90162@yahoo.co.jp>
* feat(tui): add 'termsync' option (#25871)Gregory Anders2023-11-14
| | | | | | | The 'termsync' option enables a mode (provided the underlying terminal supports it) where all screen updates during a redraw cycle are buffered and drawn together when the redraw is complete. This eliminates tearing or flickering in cases where Nvim redraws slower than the terminal redraws the screen.
* fix(defaults): set 'fsync' #26034Ploum2023-11-14
| | | | | | | | Problem: 'nofsync' may lose data if the system has a hard shutdown. #9888 Solution: Change default to 'fsync'. This may be revisited in the future when 'nofsync' can be made safer.
* test: use ST terminator instead of BEL in OSC sequencesGregory Anders2023-11-13
| | | | | | | libtermkey does not interpret OSC sequences that end with a BEL (0x07) instead of an ST (0x1b 0x5c) terminator. This causes these tests to fail since the OSC response is now parsed via libtermkey. Change the tests to use the ST terminator to appease libtermkey.
* docs: deprecate the "term_background" UI fieldGregory Anders2023-11-13
|
* refactor: move background color detection into LuaGregory Anders2023-11-13
|
* vim-patch:8.1.0970: text properties test fails when 'encoding' is not utf-8 ↵zeertzjq2023-11-13
| | | | | | | | | | | (#26023) Problem: Text properties test fails when 'encoding' is not utf-8. Solution: Compare with original value of 'encoding'. (Christian Brabandt, closes vim/vim#3986) https://github.com/vim/vim/commit/ed79d1e348c40e2432802423bf22e4f7b536bf8a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4850: mksession mixes up "tabpages" and "curdir" argumentszeertzjq2023-11-13
| | | | | | | | | Problem: Mksession mixes up "tabpages" and "curdir" arguments. Solution: Correct logic for storing tabpage in session. (closes vim/vim#10312) https://github.com/vim/vim/commit/d7c9564d8d24343f2e27205633032dd6ebe5232c Co-authored-by: LemonBoy <thatlemon@gmail.com>
* vim-patch:8.2.2112: running tests may leave some files behindzeertzjq2023-11-13
| | | | | | | | | | Problem: Running tests may leave some files behind. Solution: Delete the right files. Fix a few typos. (Dominique Pellé, closes vim/vim#7436 https://github.com/vim/vim/commit/ac665c24c97582a64ae2d151a812eca92c1ff2d6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2373: cannot build with +popupwin but without +quickfixzeertzjq2023-11-13
| | | | | | | | | Problem: Cannot build with +popupwin but without +quickfix. (John Marriott) Solution: Adjust #ifdefs. https://github.com/vim/vim/commit/5a4c3082d7ab51b3d448a91578479c96c1ab0ad3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2276: MS-Windows: session test leaves files behindzeertzjq2023-11-13
| | | | | | | | | Problem: MS-Windows: session test leaves files behind. Solution: Wipe out buffers before deleting the directory. (closes vim/vim#5187) https://github.com/vim/vim/commit/5bf46e978619ff602a7c63dd98e19de8248236b3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.1581: shared functions for testing are disorganisedzeertzjq2023-11-13
| | | | | | | | | Problem: Shared functions for testing are disorganised. Solution: Group finctions in script files. (Ozaki Kiichi, closes vim/vim#4573) https://github.com/vim/vim/commit/7a39dd7f00239059ce34660611589b26126a550c Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:partial:8.1.1218: cannot set a directory for a tab pagezeertzjq2023-11-13
| | | | | | | | | | | Problem: Cannot set a directory for a tab page. Solution: Add the tab-local directory. (Yegappan Lakshmanan, closes vim/vim#4212) https://github.com/vim/vim/commit/00aa069db8132851a91cfc5ca7f58ef945c75c73 Session-related changes only. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.0870: Vim doesn't use the new ConPTY support in Windows 10zeertzjq2023-11-13
| | | | | | | | | Problem: Vim doesn't use the new ConPTY support in Windows 10. Solution: Use ConPTY support, if available. (Nobuhiro Takasaki, closes vim/vim#3794) https://github.com/vim/vim/commit/aa5df7e3127dff6b7336df0903f5c569a40eb174 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:partial:8.0.1592: terminal windows in a session are not properly ↵zeertzjq2023-11-13
| | | | | | | | | | | | | | restored Problem: Terminal windows in a session are not properly restored. Solution: Add "terminal" in 'sessionoptions'. When possible restore the command running in a terminal. https://github.com/vim/vim/commit/4d8bac8bf593ff087517ff79090c2d224325aae6 Tests only. Nvim has no equivalent to "norestore" yet. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test(old): reorder test_mksession.vim to match upstream (#26021)zeertzjq2023-11-13
|
* feat(statuscolumn): re-evaluate for every screen line (#25885)luukvbaal2023-11-13
| | | | | Problem: v:virtnum is less useful than it could be. Solution: Always re-evaluate 'statuscolumn', and update v:virtnum accordingly.
* vim-patch:9.0.2102: matchparen highlight not cleared in completion mode (#26019)zeertzjq2023-11-13
| | | | | | | | | | | | | | | | | Problem: matchparen highlight not cleared in completion mode Solution: Clear matchparen highlighting in completion mode Remove hard-coded hack in insexpand.c to clear the :3match before displaying the completion menu. Add a test for matchparen highlighting. While at it, move all test tests related to the matchparen plugin into a separate test file. closes: vim/vim#13493 closes: vim/vim#13524 https://github.com/vim/vim/commit/9588666360e94de3ff58d4bc79aa9148fbf5fc44 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.0.0525: manually deleting temp test fileszeertzjq2023-11-13
| | | | | | | | | Problem: Manually deleting temp test files. Solution: Add the 'D' flag to writefile(). https://github.com/vim/vim/commit/5917341f65d4fc669b9d15343ccdb00c160201da Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0336: tests are flaky because of using a common file namezeertzjq2023-11-13
| | | | | | | | | | | | | Problem: Tests are flaky because of using a common file name. Solution: Rename files and directories to be more unique. https://github.com/vim/vim/commit/61abe7d8f827ec31f098e8abcdf58846b956ef16 Cherry-pick Test_custom_complete_autoload() from patch 8.2.4584. Cherry-pick test_delete.vim & test_edit.vim changes from patch 9.0.0323. Cherry-pick test_edit.vim changes from patch 8.2.3637. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0137: debugger test may fail when $CWD is very longzeertzjq2023-11-13
| | | | | | | | | | Problem: Debugger test may fail when $CWD is very long. Solution: Skip the test if the directory name is too long. (James McCoy, closes vim/vim#10837) https://github.com/vim/vim/commit/db7a88db8b52508d3df6d5947f7c4f3ef05d5f62 Co-authored-by: James McCoy <jamessan@jamessan.com>
* vim-patch:8.2.4809: various things no6 properly tested (#26017)zeertzjq2023-11-13
| | | | | | | | Problem: Various things no6 properly tested. Solution: Add various test cases. (Yegappan Lakshmanan, closes vim/vim#10259) https://github.com/vim/vim/commit/885de449c0c0ef4a8541ed1f5377351844384516 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:8.2.4541: Crash in debugger when a variable is not availablezeertzjq2023-11-13
| | | | | | | | | | Problem: Crash in debugger when a variable is not available in the current block. Solution: Check for a NULL name. (closes vim/vim#9926) https://github.com/vim/vim/commit/e406ff87c86de9da2d02d0e5ebbbf5c5eac051a6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4020: debugger test failszeertzjq2023-11-13
| | | | | | | | | Problem: Debugger test fails. Solution: Fix import statement. https://github.com/vim/vim/commit/84c62d59a3604d15c447f28e89679944a4926cc3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3984: debugger test failszeertzjq2023-11-13
| | | | | | | | | Problem: Debugger test fails. Solution: Adjust the test for modified debugging of a for loop. https://github.com/vim/vim/commit/3d0da09bb2d31afc611bf1c4b35796739d87ed63 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3395: Vim9: expression breakpoint not checked in :def functionzeertzjq2023-11-13
| | | | | | | | | | Problem: Vim9: expression breakpoint not checked in :def function. Solution: Always compile a function for debugging if there is an expression breakpoint. (closes vim/vim#8803) https://github.com/vim/vim/commit/26a4484da20039b61f18d3565a4b4339c4d1f7e3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3138: debugger test failszeertzjq2023-11-13
| | | | | | | | | Problem: Debugger test fails. Solution: Adjust eval command. https://github.com/vim/vim/commit/31e21766d6fb0a386e15ccc8c2192f6a3a210f53 Co-authored-by: Bram Moolenaar <Bram@vim.org>