Copy four files from Vim v8.2.1432.
Try to match Vim's test_alot.vim.
This marks Vim patch 8.2.0164 as ported:
vim-patch:8.2.0164: test_alot takes too long
Problem: Test_alot takes too long.
Solution: Run several tests individually.
842931cd7a
Problem: Integer overflow with large line number.
Solution: Check for overflow. (closesvim/vim#9202)
03725c5795
Put E1247 in globals.h as E1240 is also there.
Do not make getdigits() abort.
Problem: Check for overflow in put count does not work well.
Solution: Improve the overflow check. (Ozaki Kiichi, closesvim/vim#9102)
fa53722367
Add some casts as Nvim uses size_t variables in some places.
We could technically adjust the logic to check for overflow outside of size_t's
range, but it's much easier to just port the patch exactly (also means we can
use the same tests).
v:sizeoflong is N/A, so convert the 64-bit tests to Lua and use the FFI to check
long's size.
Problem: When reloading not all properties are detected.
Solution: Add the "edit" value to v:fcs_choice. (Rob Pilling, closesvim/vim#9579)
8196e94a8b
Cherry-pick some test changes from patch 8.1.1826.
Problem: Test files still use function!.
Solution: Remove the exclamation mark. Fix overwriting a function.
1e1153600c
Some of the changes were already applied previously.
This removes expand_spec.lua and copies test_expand.vim from Vim at
version v8.1.2278.
The rest of patch 8.1.2278 were already applied in #15952, so this marks
that patch as fully ported.
vim-patch:8.1.2278: using "cd" with "exe" may fail
Problem: Using "cd" with "exe" may fail.
Solution: Use chdir() instead.
3503d7c94a
Problem: With 'virtualedit' set to "block" block selection is wrong after
using "$". (Marco Trosi)
Solution: Compute the longest selected line. (closesvim/vim#8495)
b17ab86e7b
Problem: 'listchars' "exceeds" character appears in foldcolumn. Window
separator is missing. (Leonid V. Fedorenchik)
Solution: Only draw the "exceeds" character in the text area. Break the
loop when not drawing the text. (closesvim/vim#8524)
41fb723ee9
Empty string values for these options aren't actually allowed, but
check_opt_strings allows empty string options.
It so happens that 'scl' handles empty string like "auto", but empty 'fdc'
causes glitchiness (win_fdccol_count returns an incorrect value).
Just disallow empty string values for these options completely.
Problem: Restarting Insert mode in prompt buffer too often when a callback
switches windows and comes back. (Sean Dewar)
Solution: Do not set "restart_edit" when already in Insert mode.
34c20ff85b
As Test_prompt_switch_windows is skipped, implement it in prompt_buffer_spec.
Replace the 50ms term_wait calls with poke_eventloop (test seems to work anyway
without them, so maybe they're not required?)
The new test does include a duplicate screen test that may generate a "screen
test succeeded immediately" warning, but this is done to match the Vim test.
I already ported v8.1.1984 previously, but hadn't updated prompt_buffer_spec to
match test_prompt_buffer (which we have but due to Vim features such as
term_sendkeys it's mostly skipped).
Required for v8.2.3671.
Problem: Using CTRL-O in a prompt buffer moves cursor to start of the line.
Solution: Do not move the cursor when restarting edit. (closesvim/vim#7330)
ee8b787bcd
Test_prompt_editing is skipped, so edit the Lua test in prompt_buffer_spec.
Problem: Writing to prompt buffer interferes with insert mode.
Solution: Use win_enter() instead of just setting "curwin". (Ben Jackson,
closesvim/vim#7035)
4537bcc889
Vim test will be skipped, so add a Lua test.
The problem boils down to the use of aucmd_restbuf in a callback, so just test
that (via nvim_buf_set_lines).
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
196b466443
server2client requires +clientserver, which hasn't been ported yet.
The eval.txt docs and test_clientserver.vim tests for server2client already exist, so include those
changes.
test_bufline.vim: Test for setbufline requires v8.1.1189 (which was reverted in #10848).
Problem: An OptionSet autocommand does not get enough info.
Solution: Add v:option_command, v:option_oldlocal and v:option_oldglobal.
(Latrice Wilgus, closesvim/vim#4118)
d7c9687947
Problem: "verbose pwd" shows confusing info when :lcd does not change
directory.
Solution: Clear last_chdir_reason also when the directory does not change.
(closesvim/vim#9160)
64be6aa3a5
This only ports the tests, as this is already Nvim's behavior.
Problem: ":verbose pwd" does not mention 'autochdir' was applied.
Solution: Remember the last chdir was done by 'autochdir'. (issue vim/vim#9142)
0526815c15
Problem: Problem with :cd when editing file in non-existent directory. (Yee
Cheng Chin)
Solution: Prepend the current directory to get the full path. (closesvim/vim#8903)
c6376c7984
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:
- index(): requires Blobs from v8.1.0735.
Note that index() was already added as a method in v8.1.1803;
this patch only adds a test.
- iconv(): requires v8.1.1136 for test_termcodes.vim.
Nvim deprecated inputdialog(), so it no longer has an eval.txt entry.
Keep the test for hlexists() commented-out, just like previously. (Nvim
always defines the Number group, so it always returns 1 instead)
Cannot include both changes to test_syn_attr.vim as Nvim doesn't support
":hi term=..."; however, both test the same ->hlID() syntax anyway.
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:
- getcwd(): requires chdir() and Test_chdir_func() from v8.1.1291.
Note that the method call tests for getreg() and getregtype() were
removed in v8.2.1547, which has already been ported, but doesn't seem to
have been replaced with a new test...
This patch also makes getchangelist()'s argument optional (defaults to
the current buffer).
eval.txt includes a typo for gettabwinvar(), which is fixed in
v8.1.1952.
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:
- filereadable(): requires v8.1.1378 for Test_delete_rf(), but there
appears to have been some trouble porting it. (#12784)
- confirm(): requires v8.1.0832 for Test_confirm() and v8.1.0815 for
feedkeys()'s "L" flag.
(I did attempt to port the test using nvim_input() instead,
but seems that input handling for confirm() doesn't work in
--headless mode?)
Note that confirm() was actually added as a method in
v8.1.1915.
Uncomment use of method call syntax in Test_Executable() previously
included instead from v8.2.2259.
Problem: Some eval functionality is not covered by tests.
Solution: Add a few more test cases. (Masato Nishihata, closesvim/vim#4374)
17aca707f9
Test_expand() changes are required for v8.1.1921.
Test_call() and Test_cindent_func() are already ported.
Problem: Cannot save and restore a register properly.
Solution: Add getreginfo() and make setreg() accept a dictionary. (Andy
Massimino, closesvim/vim#3370)
bb861e293e
Cherry-pick eval.txt changes for getreginfo() from:
6aa57295cf207f009326
Problem
- `redir_exec` is obsolete, but it keeps getting used in new tests
because people copy existing tests.
- Disadvantages of `redir_exec`:
- Captures extra junk before the actual error/message that we _want_ to test.
- Does not fail on error, unlike e.g. `command()`.
Solution
- Use new functions like `nvim_exec` and `pcall_err`.
Problem: Only some assert functions can be used as a method.
Solution: Allow using most assert functions as a method.
24278d2407
Port tests to assert_spec.lua.
Problem: The wininfo list may contain stale entries.
Solution: When closing a window remove any other entry where the window
pointer is NULL.
4882d98339
Problem: Problem restoring 'packpath' in session.
Solution: Let "skiprtp" also apply to 'packpath'.
d23b714d8b
Port Test_mksession_skiprtp() to lua functional test.
Problem: Delete() can not handle a file name that looks like a pattern.
Solution: Use readdir() instead of appending "/*" and expanding wildcards.
(Ken Takata, closesvim/vim#4424, closesvim/vim#696)
701ff0a3e5
Problem: Setting 'winminheight' may cause 'lines' to change.
Solution: Also take minimal height of other tabpages into account. (vim/vim#7899)
9e813b3dea
Problem: 'scroll' option can change when setting the statusline or tabline
but the option context is not updated.
Solution: Update the script context when the scroll option is changed as a
side effect. (Christian Brabandt, closesvim/vim#7533)
746670604a
Problem: Setting 'winminheigt' does not take tabline into account.
Solution: Subtract the tabline from the available height. (closesvim/vim#7899)
39d4cab494
N/A patches for version.c:
vim-patch:8.1.0680: not easy to see what features are unavailable
Problem: Not easy to see what features are unavailable.
Solution: Highlight disabled features in the :version output. (Nazri Ramliy,
closesvim/vim#3756)
c85ffc9dab
vim-patch:8.2.2196: :version output has extra spaces in compile and link command
Problem: :version output has extra spaces in compile and link command.
Solution: Adjust QUOTESED. (closesvim/vim#7505)
abcbb0e9ad
vim-patch:8.2.2551: MS-Windows: colors test file is not installed
Problem: MS-Windows: colors test file is not installed.
Solution: Also copy runtime/colors/tools. (Ken Takata, closesvim/vim#7902)
d0bce504ec
vim-patch:8.2.2559: MS-Windows: guifont test fails on Windows XP
Problem: MS-Windows: guifont test fails on Windows XP.
Solution: Check windowsversion().
3650fd7098
Porting it to test/functional/legacy/backspace_opt_spec.lua
was a mistake.
Tests pass after commenting out some lines for Vi compatibility.
File is copied from Vim as of patch v8.2.0540.
Patch v8.2.0540 cannot be fully ported yet.
This file is a prequisite for future v8.2.x patches.
This test can fail on any of the Windows builds
because Github Actions does not provide enough stability
and enough memory for all runners..
Check test requirements before running any test cases
to avoid duplicate checks.
Problem: List/dict test fails.
Solution: Correct expected exception.
6d967125ad
Cherry-pick e_dictkey[] change from patch 8.2.1924.
N/A patches for version.c:
vim-patch:8.2.1929: MS-Windows: problem loading Perl 5.32
Problem: MS-Windows: problem loading Perl 5.32.
Solution: Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closesvim/vim#7234)
0289065e41
vim-patch:8.2.1932: compiler warnings when building with Athena GUI
Problem: Compiler warnings when building with Athena GUI.
Solution: Fix function signatures.
963734e316
Problem: Command line is not cleared when switching tabs and the command
line height differs.
Solution: Set the "clear_cmdline" flag when needed. (Naruhiko Nishino,
closesvim/vim#5495)
479950f6c9
Problem: No 'incsearch' highlighting for :vimgrep and similar commands.
Solution: Parse the :vimgrep command and similar ones to locate the search
pattern. (Hirohito Higashi, closesvim/vim#3344)
264cf5cfaf
Problem: ":argdel" does not work like ":.argdel" as documented. (Alexey
Demin)
Solution: Make ":argdel" work like ":.argdel". (closesvim/vim#6727)
Also fix giving the error "0 more files to edit".
7b22117c4e
Problem: Memory test still fails on Cirrus CI.
Solution: Allow for a tiny bit more tolerance in the upper limit.
bb062c1588
Check memory usage after Neovim sourced the Vimscript files.
https://github.com/neovim/neovim/pull/12679
N/A patches for version.c:
vim-patch:8.2.0062: memory test is flaky on FreeBSD
Problem: Memory test is flaky on FreeBSD.
Solution: Add a short sleep before getting the first size.
e7538ae997
vim-patch:8.2.0071: memory test often fails on Cirrus CI
Problem: Memory test often fails on Cirrus CI.
Solution: Allow for more tolerance in the upper limit. Remove sleep.
1832d12aea
Problem: Comparing two NULL list fails.
Solution: Change the order of comparing two lists.
7b293c730b
N/A patches for version.c:
vim-patch:8.2.1187: terminal2 test sometimes hangs in the GUI on Travis
Problem: Terminal2 test sometimes hangs in the GUI on Travis.
Solution: Disable Test_zz2_terminal_guioptions_bang() for now.
c85156bb89
vim-patch:8.2.1188: memory leak with invalid json input
Problem: Memory leak with invalid json input.
Solution: Free all keys at the end. (Dominique Pellé, closesvim/vim#6443,
closesvim/vim#6442)
6d3a7213f5
vim-patch:8.2.1196: build failure with normal features
Problem: Build failure with normal features.
Solution: Add #ifdef.
83e7450053
vim-patch:8.2.1198: terminal2 test sometimes hangs in the GUI on Travis
Problem: Terminal2 test sometimes hangs in the GUI on Travis.
Solution: Move test function to terminal3 to see if the problem moves too.
a4b442614c
Problem: Using closure may consume a lot of memory.
Solution: unreference items that are no longer needed. Add a test. (Ozaki
Kiichi, closesvim/vim#3961)
209b8e3e3b
Problem: A plugin cannot easily expand a command like done internally.
Solution: Add the expandcmd() function. (Yegappan Lakshmanan, closesvim/vim#4514)
80dad48c50
Problem: Not restoring Insert mode if leaving a prompt buffer by using a
mouse click.
Solution: Set b_prompt_insert appropriately. Also correct cursor position
when moving cursor to last line.
891e1fd894
Problem: BS in prompt buffer starts new line.
Solution: Do not allows BS over the prompt. Make term_sendkeys() handle
special keys. Add a test.
6b810d92a9
Having the cursor change column can be surprising.
Force startofline in functional and old tests.
Remove the functional breakindent test, as it's a subset of the oldtest one.
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.
This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).
Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.