aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_functions.vim
Commit message (Collapse)AuthorAge
* test: move oldtests to test directory (#22536)dundargoc2023-03-07
| | | | | The new oldtest directory is in test/old/testdir. The reason for this is that many tests have hardcoded the parent directory name to be 'testdir'.
* vim-patch:9.0.1277: cursor may move with autocmd in Visual mode (#22116)zeertzjq2023-02-04
| | | | | | | Problem: Cursor may move with autocmd in Visual mode. Solution: Restore "VIsual_active" before calling check_cursor(). (closes vim/vim#11939) https://github.com/vim/vim/commit/49f0524fb575bb1cf4881e472afab7d37c579440
* vim-patch:9.0.1129: sporadic Test_range() failure (#21619)zeertzjq2023-01-02
| | | | | | | | Problem: Sporadic Test_range() failure. Solution: Clear typeahead. Move to a separate function. (issue vim/vim#22771) https://github.com/vim/vim/commit/7bdcba08bb5e4c39093cdedee187177d705c7cb9 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* test(old): skip Vim9 script with less divergencezeertzjq2022-12-03
|
* vim-patch:8.2.2886: various pieces of code not covered by testszeertzjq2022-11-25
| | | | | | | | | | | Problem: Various pieces of code not covered by tests. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8255) https://github.com/vim/vim/commit/34fcb697240c1bc9e69417ed75db3b1a83479724 Nvim does not have test_unknown(). Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:8.2.2466: max() and min() can give many error messageszeertzjq2022-11-25
| | | | | | | | | Problem: Max() and min() can give many error messages. Solution: Bail out at the first error. (closes vim/vim#1039, closes vim/vim#7778) https://github.com/vim/vim/commit/ab65fc77c5389f7d3f788bbdc3d931561feab131 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0863: col() and charcol() only work for the current window ↵zeertzjq2022-11-13
| | | | | | | | | | | | | (#21038) Problem: col() and charcol() only work for the current window. Solution: Add an optional winid argument. (Yegappan Lakshmanan, closes vim/vim#11466, closes vim/vim#11461) https://github.com/vim/vim/commit/4c8d2f02b3ce037bbe1d5ee12887e343c6bde88f Cherry-pick test_functions.vim change from patch 8.2.0633. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.0715: wrong argument for append() gives two error messages ↵zeertzjq2022-11-11
| | | | | | | | | | | (#21023) Problem: Wrong argument for append() gives two error messages. Solution: When getting an error for a number argument don't try using it as a string. (closes vim/vim#11335) https://github.com/vim/vim/commit/801cd35e7e3b21e519e12a1610ee1d721e40893e Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2873: not enough tests for writing bufferszeertzjq2022-11-07
| | | | | | | | | Problem: Not enough tests for writing buffers. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#8229) https://github.com/vim/vim/commit/46aa6f93acb5d932d2893606d980a6b4b8a9594c Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:8.2.1736: failure to compile a pattern not tested muchzeertzjq2022-11-06
| | | | | | | | Problem: Failure to compile a pattern not tested much. Solution: Add tests where a pattern fails to compile. (Yegappan Lakshmanan, closes vim/vim#7004) https://github.com/vim/vim/commit/531be47ac5522807b265c6287021a01c9b895ac9
* vim-patch:9.0.0836: wrong error when using extend() with funcrefzeertzjq2022-11-06
| | | | | | | Problem: Wrong error when using extend() with funcref. Solution: Better check the variable type. (closes vim/vim#11468, closes vim/vim#11455) https://github.com/vim/vim/commit/91c75d18d9cdc32df57e648640de7476fbcb4d76
* vim-patch:8.2.2921: E704 for script local variable is not backwards compatiblezeertzjq2022-11-06
| | | | | | | | | | | Problem: E704 for script local variable is not backwards compatible. (Yasuhiro Matsumoto) Solution: Only give the error in Vim9 script. Also check for function-local variable. https://github.com/vim/vim/commit/b54abeeafb074248597878a874fed9a66b114c06 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2920: still a way to shadow a builtin functionzeertzjq2022-11-06
| | | | | | | | | Problem: Still a way to shadow a builtin function. (Yasuhiro Matsumoto) Solution: Check the key when using extend(). (issue vim/vim#8302) https://github.com/vim/vim/commit/6f1d2aa437744a7cb0206fdaa543a788c5a56c79 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2918: builtin function can be shadowed by global variablezeertzjq2022-11-06
| | | | | | | | | | Problem: Builtin function can be shadowed by global variable. Solution: Check for builtin function before variable. (Yasuhiro Matsumoto, closes vim/vim#8302) https://github.com/vim/vim/commit/3d9c4eefe656ee8bf58c0496a48bd56bac180056 Cherry-pick Test_gettext() from patch 8.2.2886.
* fix(eval): make error number of charidx() same as Vimzeertzjq2022-11-05
|
* vim-patch:partial:8.2.1183: assert_fails() checks the last error messagezeertzjq2022-11-05
| | | | | | | | | | | | | | | Problem: assert_fails() checks the last error message. Solution: Check the first error, it is more relevant. Fix all the tests that rely on the old behavior. https://github.com/vim/vim/commit/9b7bf9e98f06ece595fed7a3ff53ecce89797a53 Skip test_listener.vim, test_textprop.vim, test_viminfo.vim. Skip test_python2.vim: affected line fails and hasn't been ported. Skip test_python3.vim: affected lines fail and haven't been ported. Skip CHECK_LIST_MATERIALIZE. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0615: regexp benchmark stest is old style (#20940)zeertzjq2022-11-05
| | | | | | | | | | Problem: Regexp benchmark stest is old style. Solution: Make it a new style test. Fix using a NULL list. Add more tests. (Yegappan Lakshmanan, closes vim/vim#5963) https://github.com/vim/vim/commit/ad48e6c1590842ab6d48e6caba3e9250734dae27 N/A patches: vim-patch:9.0.0829: wrong counts in macro comment
* vim-patch:8.2.0644: insufficient testing for invalid function argumentszeertzjq2022-11-05
| | | | | | | | | | | | Problem: Insufficient testing for invalid function arguments. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5988) https://github.com/vim/vim/commit/99fa721944dda9d07c53c907c33466728df5c271 Omit test_listener.vim: changed again in patch 8.2.1183. Omit test_textprop.vim: changed again in patch 8.2.1183. Cherry-pick quickfix feature checks from patch 8.1.2373. Omit Test_saveas() change: duplicate and removed in patch 8.2.0866.
* vim-patch:8.2.0448: various functions not properly tested (#20926)zeertzjq2022-11-04
| | | | | | | | | | Problem: Various functions not properly tested. Solution: Add more tests, especially for failures. (Yegappan Lakshmanan, closes vim/vim#5843) https://github.com/vim/vim/commit/0e05de46226eb4e5ea580beefa71831f92d613d3 Cherry-pick test changes from patch 8.2.0427 and skip Test_has(). Cherry-pick Test_complete_wildmenu() change from patch 8.2.4339.
* vim-patch:8.2.4234: test_garbagecollect_now() does not check v:testingzeertzjq2022-10-27
| | | | | | | | | Problem: test_garbagecollect_now() does not check v:testing as documented. Solution: Give an error if v:testing is not set. https://github.com/vim/vim/commit/b3d83980d2ac0f7a25314270416f17af874ca269 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2100: insufficient testing for function range and dictzeertzjq2022-10-27
| | | | | | | Problem: Insufficient testing for function range and dict. Solution: Add a few tests. (Dominique Pellé, closes vim/vim#7428) https://github.com/vim/vim/commit/67322bf74a106b6476b093e75da87d61e2181b76
* vim-patch:8.2.2837: various code lines not covered by testszeertzjq2022-10-27
| | | | | | | | | Problem: Various code lines not covered by tests. Solution: Add test cases. (Dominique Pellé, closes vim/vim#8178) https://github.com/vim/vim/commit/6d37e8e3baafba460bd2d051170d213c1ba9a523 Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
* vim-patch:8.1.1826: tests use hand coded feature and option checkszeertzjq2022-10-26
| | | | | | | | | | | | | Problem: Tests use hand coded feature and option checks. Solution: Use the commands from check.vim in more tests. https://github.com/vim/vim/commit/8c5a278fc508da6dfe50e69b6ee734451aa4eafb Omit Test_wincolor(): there are later patches that touch that function. Omit test_memory_usage.vim: a Lua test is used for that file. Cherry-pick Test_issue_3969() from patch 8.1.0969. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0610: some tests are still old stylezeertzjq2022-10-26
| | | | | | | | | | | Problem: Some tests are still old style. Solution: Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5957) https://github.com/vim/vim/commit/08f4157c5cabc55bcb22f04dd7c717aba40caa34 Fix missing error message when sort() compare function fails. Cherry-pick a line in test_utf8.vim from patch 8.2.0448. Cherry-pick builtin_function() change from patch 8.2.0595.
* vim-patch:8.2.0163: test hangs on MS-Windows consolezeertzjq2022-10-26
| | | | | | | | | Problem: Test hangs on MS-Windows console. Solution: use feedkeys() instead of test_feedinput(). (Ken Takata) https://github.com/vim/vim/commit/272ca95fc3d21ae1e2626a7aec38a6990e88ad6b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0162: balloon test fails in the GUIzeertzjq2022-10-26
| | | | | | | | | Problem: Balloon test fails in the GUI. Solution: Skip test in the GUI. https://github.com/vim/vim/commit/7d8ea0b24191d64155fcf9e8d2d2eefff91ae549 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0418: code in eval.c not sufficiently covered by testszeertzjq2022-10-26
| | | | | | | | | Problem: Code in eval.c not sufficiently covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5815) https://github.com/vim/vim/commit/8b633135106dda8605463b780573c45b00c22afe Nvim does not have v:none, so comment out test for it.
* vim-patch:8.2.0401: not enough test coverage for evalvars.czeertzjq2022-10-26
| | | | | | | | | | | | | Problem: Not enough test coverage for evalvars.c. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5804) https://github.com/vim/vim/commit/8dfcce3a78ccb520cc9d09081f998091494c50bf Assert E475 instead of E474 in :redir test because a later patch changed the error number. Comment out the test for :echo with a deeply nested container as Nvim implements :echo very differently.
* vim-patch:8.2.0211: test for ANSI colors fails without an "ls" commandzeertzjq2022-10-26
| | | | | | | | | Problem: Test for ANSI colors fails without an "ls" command. Solution: Use "dir". (Ken Takata, closes vim/vim#5582) https://github.com/vim/vim/commit/94255df057afa0b7dde77612f3274d4440871bd1 Cherry-pick test_functions.vim change from patch 8.2.0186.
* vim-patch:8.2.0179: still a few places where range() does not workzeertzjq2022-10-26
| | | | | | | | | | | | | | | | Problem: Still a few places where range() does not work. Solution: Fix using range() causing problems. https://github.com/vim/vim/commit/b09920203a0f2b202497ef9632f8447f73d0f1fb Code is mostly N/A. Cherry-pick all of Test_range() from patch 8.2.0159. - Use nvim_input() instead of test_feedinput() - Assert a different result from json_encode() - Assert a different error for sign_undefine() Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0539: long message test can be flaky (#20282)zeertzjq2022-09-22
| | | | | | | Problem: Long message test can be flaky. Solution: Wait for more prompt instead of ruler. https://github.com/vim/vim/commit/21d393a12be86126d9326ea0c244d3a101b77151 Comment N/A lines out instead of deleting in buftype tests.
* vim-patch:8.2.0712: various code not fully testedzeertzjq2022-09-22
| | | | | | | | Problem: Various code not fully tested. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#6049) https://github.com/vim/vim/commit/0ff5dedf0f69e56320199db7a2aad46be2a1f9b7 Nvim does not support encoding=latin1 or setting keycodes/termcaps.
* test(old): add a function roughly equivalent to test_setmouse() (#20224)zeertzjq2022-09-17
| | | | Mouse movement events usually have no effect, so passing "move" to nvim_input_mouse() works in most cases.
* vim-patch:9.0.0449: there is no easy way to translate a key code into a ↵zeertzjq2022-09-13
| | | | | | | | | | | | | string (#20168) Problem: There is no easy way to translate a string with a key code into a readable string. Solution: Add the keytrans() function. (closes vim/vim#11114) https://github.com/vim/vim/commit/cdc839353f68ca43db6446e1b727fc7ba657b738 vim-patch:7b2d87220c6c Add missing part of patch https://github.com/vim/vim/commit/7b2d87220c6c974d5cdae672b6f9620a6bcbd1dc
* vim-patch:8.2.4671: 'wildignorecase' is sometimes not used for glob() (#20165)zeertzjq2022-09-12
| | | | | | Problem: 'wildignorecase' is sometimes not used for glob(). Solution: Also use 'wildignorecase' when there are no wildcards. (closes vim/vim#10066, closes vim/vim#8350) https://github.com/vim/vim/commit/a3157a476bfa8c3077d510cc8400093c0d115df5
* vim-patch:8.2.1505: not all file read and writecode is testedzeertzjq2022-09-03
| | | | | | | | Problem: Not all file read and writecode is tested. Solution: Add a few tests. (Dominique Pellé, closes vim/vim#6764) https://github.com/vim/vim/commit/1b04ce2d400fda97410a961288c496bd8f445a9c Cherry-pick Test_glob() from patch 8.2.0634.
* vim-patch:9.0.0276: 'buftype' values not sufficiently testedzeertzjq2022-08-27
| | | | | | | | | Problem: 'buftype' values not sufficiently tested. Solution: Add and extend tests with 'buftype' values. (closes vim/vim#10988) https://github.com/vim/vim/commit/93f72cc119c796f1ccb75468ef9e446cbfb41e9b "terminal" and "popup" buffer types cannot be tested, and commenting them out causes an error, so just remove them.
* vim-patch:9.0.0274: netrw plugin does not show remote fileszeertzjq2022-08-27
| | | | | | Problem: Netrw plugin does not show remote files. Solution: Do read a file when 'buftype' is "acwrite". (closes vim/vim#10983) https://github.com/vim/vim/commit/c312619f7c0cf590d96e0b2ed891d1f6c43d769b
* vim-patch:9.0.0261: bufload() reads a file even if the name is not a file ↵zeertzjq2022-08-25
| | | | | | | | | name (#19944) Problem: bufload() reads a file even if the name is not a file name. (Cyker Way) Solution: Do not read the file when the buffer name is not a file name. (closes vim/vim#10975) https://github.com/vim/vim/commit/2eddbacd6dc17c84e4bdc41e60e81949a36bb973
* vim-patch:8.1.{1915,1921,1953} (#19900)zeertzjq2022-08-23
| | | | | | | | | | | | | | | | | | | | | | | | vim-patch:8.1.1915: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/1a3a89168d61c2fed91cbca812cf1c6983901b79 Move debugbreak() to the right place. vim-patch:8.1.1921: more functions can be used as methods Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/a4208966fb289a505ebdef62bbc37c214069bab4 vim-patch:8.1.1953: more functions can be used as a method Problem: More functions can be used as a method. Solution: Allow more functions to be used as a method. https://github.com/vim/vim/commit/f9f24ce7a0e5988fedf2e2ff751818f9b07510a6 Omit test_termcodes.vim: cannot be used and superseded by later patches. Cherry-pick test_bufline.vim change from patch 8.1.1993.
* vim-patch:8.1.0832: confirm() is not tested (#19896)zeertzjq2022-08-23
| | | | | Problem: confirm() is not tested. Solution: Add a test. (Dominique Pelle, closes vim/vim#3868) https://github.com/vim/vim/commit/2e0500921891e4fec57e97d3c0021aa2d2b4d7ae
* vim-patch:8.2.3421: a bit of code is not covered by tests (#19895)zeertzjq2022-08-22
| | | | | | | | | Problem: A bit of code is not covered by tests. Solution: Add a few more test cases. (Dominique Pellé, closes vim/vim#8857) https://github.com/vim/vim/commit/d176ca3dde47c11aae0376c31b7e1ba0939c8c6c Cherry-pick Test_trim() change from patch 8.2.0448. Cherry-pick Test_History() change from patch 8.2.1736. Cherry-pick charidx() and trim() type checks from patch 8.2.3135.
* fix(charclass): make behavior with empty str match latest Vim (#19749)zeertzjq2022-08-13
| | | | Later Vim patches changed to return 0 for empty string and null string. Also update setcellwidth() docs to match latest Vim.
* vim-patch:8.2.{1536,1540}: charclass() (#19748)zeertzjq2022-08-13
| | | | | | | | | | | | | | | | | | | | | vim-patch:8.2.1536: cannot get the class of a character; emoji widths are wrong Problem: Cannot get the class of a character; emoji widths are wrong in some environments. Solution: Add charclass(). Update some emoji widths. Add script to check emoji widths. https://github.com/vim/vim/commit/4e4473c927167fd24e5c8df90e0e8035080cf2da Use latest charclass() docs from Vim. Rewrite DoIt() in emoji_list.vim in Lua. Omit emoji table updates: - emoji_width update looks wrong as these added ranges are only double-width when followed by 0xFE0F. - Other updates are too old. vim-patch:8.2.1540: the user cannot try out emoji character widths Problem: The user cannot try out emoji character widths. Solution: Move the emoji script to the runtime/tools directory. https://github.com/vim/vim/commit/98945560c1ae6e2ddee820a7de718a36e3f4b6e5
* vim-patch:8.2.0509: various code is not properly tested.zeertzjq2022-07-19
| | | | | | | | | | Problem: various code is not properly tested. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5871) https://github.com/vim/vim/commit/cde0ff39da2459b16007fef701ebaa449fb6fe9d Cherry-pick test_clientserver.vim change from patch 8.1.1826. Cherry-pick a comment from patch 8.2.0301. Omit test_viminfo.vim.
* vim-patch:8.2.1040: not enough testing for movement commandszeertzjq2022-07-17
| | | | | | | | | Problem: Not enough testing for movement commands. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#6313) https://github.com/vim/vim/commit/bdd2c290d3cda69e0046c42f0c651f60bc510a16 Cherry-pick test_functions.vim changes from patch 8.2.0183. Cherry-pick Test_normal18_z_fold() change from patch 8.2.0540.
* vim-patch:8.2.0325: ex_getln.c code not covered by testszeertzjq2022-07-08
| | | | | | | | | Problem: Ex_getln.c code not covered by tests. Solution: Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#5702) https://github.com/vim/vim/commit/578fe947e3ad0cc7313c798cf76cc43dbf9b4ea6 Cherry-pick Test_Ex_global() from patch 8.2.0293. Test_rightleftcmd() fails if incsearch is enabled, so disable it.
* vim-patch:8.2.5058: input() does not handle composing characters properly ↵zeertzjq2022-06-06
| | | | | | | | | | (#18872) Problem: input() does not handle composing characters properly. Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv(). (closes vim/vim#10527) https://github.com/vim/vim/commit/e3a529bc877909a9eccf792461050b4f6737ed33 Cherry-pick all of Test_input_func() from patch 8.2.0316.
* vim-patch:8.2.4858: K_SPECIAL may be escaped twicezeertzjq2022-05-03
| | | | | | Problem: K_SPECIAL may be escaped twice. Solution: Avoid double escaping. (closes vim/vim#10340) https://github.com/vim/vim/commit/db08887f24d20be11d184ce321bc0890613e42bd
* vim-patch:8.2.4696: delete() with "rf" argument does not report a failure ↵zeertzjq2022-04-06
| | | | | | | (#18002) Problem: delete() with "rf" argument does not report a failure. Solution: Return -1 if the directory could not be removed. (closes vim/vim#10078) https://github.com/vim/vim/commit/478700336d1c72e133b8ff6841e968c1bb1658ed