Commit Graph
43 Commits
Author SHA1 Message Date
zeertzjq d8df9afad6 vim-patch:8.2.2969: subtracting from number option fails when result is zero
Problem:    Subtracting from number option fails when result is zero. (Ingo
            Karkat)
Solution:   Reset the string value when using the numeric value.
            (closes vim/vim#8351)
https://github.com/vim/vim/commit/a42e6e0082a6d564dbfa55317d4a698ac12ae898

Cherry-pick Test_compound_assignment_operators() changes from patch 8.2.1593
2022-07-25 18:20:47 +08:00
zeertzjq 4aa4675fbf vim-patch:8.2.0293: various Ex commands not sufficiently tested
Problem:    Various Ex commands not sufficiently tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes vim/vim#5673)
https://github.com/vim/vim/commit/818fc9ad143911b2faa0d7cee86724aa70a02080

Needs to assert E170 instead of E580 because patch 8.2.3486 has been
ported but patch 8.2.1183 hasn't.
2022-07-12 16:23:32 +08:00
zeertzjq d079995fb8 vim-patch:8.2.0270: some code not covered by tests
Problem:    Some code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes vim/vim#5649)
https://github.com/vim/vim/commit/bc2b71d44a0b90b6aeb3534a76912fccbe5577df
2022-07-12 14:08:34 +08:00
zeertzjq 27fd17a79c vim-patch:8.2.0243: insufficient code coverage for ex_docmd.c functions
Problem:    Insufficient code coverage for ex_docmd.c functions.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5618)
https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7

Cherry-pick Test_window_only() from patch 8.2.0203.
Cherry-pick a memory leak fix from patch 8.2.0399.
2022-07-12 05:36:33 +08:00
zeertzjq 8a80ab27bd vim-patch:8.1.1846: inconsistently using GetVimCommand() and v:progpath
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes vim/vim#4806)
https://github.com/vim/vim/commit/93344c2d707d9953f351c944e6a237c9916f69a3

Cherry-pick a change to test_profile.vim from patch 8.1.1544.
Cherry-pick a change to test_vimscript.vim from patch 8.1.1826.

Some of the args are no-op in Nvim, and `-i NONE` and `--headless` are
already added by `GetVimCommand()`. I'll try to match the order of args
in upstream, substituting `--not-a-term` with `--headless`.
2022-02-14 18:56:30 +08:00
zeertzjq fe621b4ac0 vim-patch:8.1.0711: test files still use function!
Problem:    Test files still use function!.
Solution:   Remove the exclamation mark.  Fix overwriting a function.
https://github.com/vim/vim/commit/1e1153600c0377472d62cc553173fe555ddcf5a7

Some of the changes were already applied previously.
2022-02-07 05:34:20 +08:00
zeertzjq e6e9ffb345 vim-patch:7.4.1228
Problem:    copy() and deepcopy() fail with special variables. (Nikolai
            Pavlov)
Solution:   Make it work.  Add a test.  Closes vim/vim#614.
https://github.com/vim/vim/commit/155500077c80cdb5d9c63996000c011b66a676bf

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
zeertzjq a937fc53ef vim-patch:7.4.1181
Problem:    free_tv() can't handle special variables. (Damien)
Solution:   Add the variable type.
https://github.com/vim/vim/commit/6650a694547eb744afa060ec62dd8270e99db9f2

Code is N/A. This only ports the tests.
2022-02-07 05:34:20 +08:00
zeertzjq 3fa5d50183 vim-patch:7.4.1178
Problem:    empty() doesn't work for the new special variables.
Solution:   Make empty() work. (Damien)
https://github.com/vim/vim/commit/767d8c1a1ae762ecf47297c168b8c23caf05d30a

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
zeertzjq bf8f2ebb79 vim-patch:7.4.1173
Problem:    No test for new behavior of v:true et al.
Solution:   Add a test.
https://github.com/vim/vim/commit/65591001e405cbaaf9772c9375d0bb6049cf9a3a

Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
zeertzjq b3a14a71b0 vim-patch:7.4.1167
Problem:    No tests for "is" and "isnot" with the new variables.
Solution:   Add tests.
https://github.com/vim/vim/commit/04369229657f182d35b471eb8b38f273a4d9ef65

Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
zeertzjq 6a00b16896 vim-patch:7.4.1164
Problem:    No tests for comparing special variables.  Error in jsondecode()
            not reported.  test_json does not work Japanse system.
Solution:   Set scriptencoding. (Ken Takata) Add a few more tests. Add error.
https://github.com/vim/vim/commit/6039c7f05376f0e470cf62bf2757e653aea357f3

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
zeertzjq 7b8fcf0234 vim-patch:7.4.1163
Problem:    Expressions "0 + v:true" and "'' . v:true" cause an error.
Solution:   Return something sensible when using a special variable as a
            number or as a string. (suggested by Damien)
https://github.com/vim/vim/commit/17a13437c9414a8693369a97f3be2fc8ad48c12e

Code is N/A. This only ports the tests.
Comment out tests involving v:none as Nvim has removed it.
2022-02-07 05:34:20 +08:00
Sean Dewar 7002a3433b vim-patch:8.2.2658: :for cannot loop over a string
Problem:    :for cannot loop over a string.
Solution:   Accept a string argument and iterate over its characters.
https://github.com/vim/vim/commit/74e54fcb447e5db32f9c2df34c0554bbecdccca2

v8.2.2659 is already ported.

N/A patches for version.c:

vim-patch:8.2.2736: Vim9: for loop over string is a bit slow

Problem:    Vim9: for loop over string is a bit slow.
Solution:   Avoid using strlen().
https://github.com/vim/vim/commit/175a41c13f3e27e30c662f2f418c5a347dbc645d
2022-02-05 19:55:11 +00:00
Sean Dewar 6110480c29 feat(eval/method): partially port v8.1.1921
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.
2021-10-03 20:06:31 +01:00
Sean Dewar 19232593ba fix(f_insert): partially port v8.2.0634
Fixes a crash in f_insert() when inserting into a NULL blob.
Include blob-related test changes and some other simple changes.
2021-09-15 22:57:54 +01:00
Sean Dewar 5fbc1a49c7 vim-patch:8.1.1888: 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/073e4b92e613d22ce7b16e0fbf5c0e40cb5f9b2c

test_popup.vim already has the changes from this patch (they're N/A
anyway).
2021-08-12 22:35:24 +01:00
Jan Edmund Lazo 1b0937dd89 test/old: partial port of patch v8.2.1.0183
Prep for patch v8.2.0511.
2021-05-24 15:25:32 -04:00
Jan Edmund Lazo da5c547ee3 vim-patch:8.1.2246: some tests are still in old style
Problem:    Some tests are still in old style.
Solution:   Change a few tests to new style. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/1f068233c101ecf5966e6df14853fe68f08175a7
2020-12-11 23:39:11 -05:00
Sean Dewar 8fb786e415 vim-patch:8.2.0602: :unlet $VAR does not work properly (#13238)
Problem:    :unlet $VAR does not work properly.
Solution:   Make ":lockvar $VAR" fail.  Check the "skip" flag.
https://github.com/vim/vim/commit/7e0868efcf094f2cc59fa4e18af3a8dc7aedd64f

Include patch 8.2.0601 changes so that ex_unletlock() can execute a callback if there are no errors.
2020-12-02 08:44:13 -05:00
Jan Edmund Lazo b3ddc23507 test/old: partial port of patch 8.1.0711
Patch 8.1.0711 is too difficult to merge in 1 commit.
2020-11-30 01:18:33 -05:00
Jan Edmund Lazo a3922e03a9 vim-patch:8.2.0271: the "num64" feature is available everywhere
Problem:    The "num64" feature is available everywhere and building without
            it causes problems.
Solution:   Graduage the "num64" feature. (James McCoy, closes vim/vim#5650)
https://github.com/vim/vim/commit/82f654e092ac5b86316bc1b30c0b07a849813186

Restore Test_printf_spec_b() from patch 7.4.2221..

N/A patches for version.c:

vim-patch:8.2.0594: MS-Windows: cannot build with WINVER set to 0x0501

Problem:    MS-Windows: cannot build with WINVER set to 0x0501.
Solution:   Only use inet_ntop() when available. (Ozaki Kiichi, closes vim/vim#5946)
https://github.com/vim/vim/commit/b6fb0516ec862a18fdffe06c9400d507a7193835

vim-patch:8.2.0965: has_funcundefined() is not used

Problem:    Has_funcundefined() is not used.
Solution:   Delete the function. (Dominique Pellé, closes vim/vim#6242)
https://github.com/vim/vim/commit/5055c56cfbedc6326c607d40c7a1241682f7675e

vim-patch:8.2.1370: MS-Windows: warning for using fstat() with stat_T

Problem:    MS-Windows: warning for using fstat() with stat_T.
Solution:   use _fstat64() if available. (Naruhiko Nishino, closes vim/vim#6625)
https://github.com/vim/vim/commit/c753478b82613df37b145764e27f5514542edb97

vim-patch:8.2.2056: configure fails when building with implicit-function-declaration

Problem:    Configure fails when building with the
            "implicit-function-declaration" error enabled, specifically on Mac.
Solution:   Declear the functions like in the source code. (suggestion by
            Clemens Lang, closes vim/vim#7380)
https://github.com/vim/vim/commit/ce7be3a0e6f19bc85990bb8fcfe5e208944777b4
2020-11-27 21:24:59 -05:00
Jan Edmund Lazo 4edf7b9ff2 vim-patch:8.1.1591: on error garbage collection may free memory in use
Problem:    On error garbage collection may free memory in use.
Solution:   Reset may_garbage_collect when evaluating expression mapping.
            Add tests. (Ozaki Kiichi, closes vim/vim#4579)
https://github.com/vim/vim/commit/7d491c425334d9477637372a4ebec64c228c8430
2020-09-30 21:00:17 -04:00
erw7 7cb38d5ac4 vim-patch:8.1.1563: crash when using closures
Problem:    Crash when using closures.
Solution:   Set reference in varlist of funccal when running the garbage
            collector. (Ozaki Kiichi, closes vim/vim#4554, closes vim/vim#4547)
https://github.com/vim/vim/commit/6e5000d493b4f385f901eb97f3ce0c8088373403
2020-09-30 21:00:17 -04:00
Jan Edmund Lazo 2ed23af9b2 vim-patch:8.1.2272: test may hang at more prompt
Problem:    Test may hang at more prompt.
Solution:   Reset 'more' after resetting 'compatible'. (Michael Soyka)
https://github.com/vim/vim/commit/34059e7b67ae8a58dc2471b309afe05d9dde760f
2019-11-09 09:58:32 -05:00
Jurica Bradaric fcc24d0df3 vim-patch:8.1.1625: script line numbers are not exactly right
Problem:    Script line numbers are not exactly right.
Solution:   Handle heredoc and continuation lines better. (Ozaki Kiichi,
            closes vim/vim#4611, closes vim/vim#4511)
https://github.com/vim/vim/commit/bc2cfe4672d370330b8698d4d025697a9a6ec569
2019-10-13 11:54:54 +02:00
Jan Edmund Lazo b457a58e34 vim-patch:8.1.0990: floating point exception with "%= 0" and "/= 0"
Problem:    Floating point exception with "%= 0" and "/= 0".
Solution:   Avoid dividing by zero. (Dominique Pelle, closes vim/vim#4058)
https://github.com/vim/vim/commit/e21c1580b7acb598a6e3c38565434fe5d0e2ad7a
2019-07-28 17:19:20 -04:00
James McCoy d265054394 vim-patch:8.1.1382: error when editing test file
Problem:    Error when editing test file.
Solution:   Remove part of modeline.
https://github.com/vim/vim/commit/3020a87cb121123abf1e9a1eca0eddac241fc481
2019-06-24 06:46:01 -04:00
Jan Edmund Lazo cb01925eb4 vim-patch:8.0.1549: various small problems in test files
Problem:    Various small problems in test files.
Solution:   Include small changes.
https://github.com/vim/vim/commit/5d7ead3bc85eefd0929bfcbb579510c8164ea1be
2019-06-15 22:24:59 -04:00
erw7 d46aaa0746 vim-patch:8.1.0902: incomplete set of assignment operators
Problem:    Incomplete set of assignment operators.
Solution:   Add /=, *= and %=. (Ozaki Kiichi, closes vim/vim#3931)
https://github.com/vim/vim/commit/ff697e6cef8ced7717a21fd525ab3200b2f1724f
2019-05-29 12:05:56 +09:00
Justin M. Keyes 671b244e6c Merge #8701 from janlazo/vim-8.0.1140 2018-07-12 05:24:21 +02:00
Jan Edmund Lazo b5c0031d4e oldtests: fix func Test_echo_and_string() 2018-07-07 07:14:06 -04:00
Jan Edmund Lazo 41ccdb1ef2 vim-patch:8.0.1140: still old style tests
Problem:    Still old style tests.
Solution:   Convert two tests to new style. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/bb3e6416f157f68799ccb6070fa2f91df6780e79
2018-07-06 22:32:45 -04:00
Jan Edmund Lazo 336ce02a6e vim-patch:8.0.0663: unexpected error with 'verbose' (#8692)
Problem:    Giving an error message only when 'verbose' set is unexpected.
Solution:   Give a warning message instead.
https://github.com/vim/vim/commit/f8be461d0284110b321be748fea206d4169b98bb
2018-07-06 20:50:08 +02:00
Justin M. Keyes d6cbe6ca87 vim-patch:8.0.0667: more tests for :endfunc
[Only the test is merged; code was addressed by 60c025267265.]

Problem:    Memory access error when command follows :endfunction. (Nikolai
            Pavlov)
Solution:   Make memory handling in :function straightforward. (closes vim/vim#1793)
https://github.com/vim/vim/commit/53564f7c1a2998d92568e07fff1f2a4c1cecb646
2018-01-21 18:42:45 +01:00
Justin M. Keyes a5d33d5e90 vim-patch:8.0.0656: cannot use ! after some user commands
[Test passes, and the code change doesn't look applicable. So this only
includes the test.]

Problem:    Cannot use ! after some user commands.
Solution:   Properly check for existing command. (Higashi Higashi)
https://github.com/vim/vim/commit/6f9a476b2f2f0bb5c50d703ec4fc535ffd5bfe8f
2018-01-21 18:42:45 +01:00
Justin M. Keyes a185ab70fd vim-patch:8.0.0655: not easy to make sure a function does not exist
Problem:    Not easy to make sure a function does not exist.
Solution:   Add ! as an optional argument to :delfunc.

https://github.com/vim/vim/commit/d6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa
2018-01-21 18:42:45 +01:00
Justin M. Keyes 52778d62fc vim-patch:8.0.0654: no warning for text after :endfunction
Problem:    Text found after :endfunction is silently ignored.
Solution:   Give a warning if 'verbose' is set.  When | or \n are used,
            execute the text as a command.
https://github.com/vim/vim/commit/663bb2331626944cea156374858131fcd323b9e9

Note: the code part of this patch was addressed by 60c0252672.
2018-01-21 18:42:44 +01:00
James McCoy 6757c503bd vim-patch:8.0.0614
Problem:    float2nr() is not exactly right.
Solution:   Make float2nr() more accurate.  Turn test64 into a new style test.
            (Hirohito Higashi, closes vim/vim#1688)

https://github.com/vim/vim/commit/863e80b4451b5102b41bebf9ddca3a420de746fa
2017-06-06 07:39:33 -04:00
James McCoy 9281653233 Merge remote-tracking branch 'origin/master' into vim-7.4.1975 2017-06-06 07:33:50 -04:00
James McCoy 9a21d89b17 vim-patch:8.0.0561
Problem:    Undefined behavior when using backslash after empty line.
Solution:   Check for an empty line. (Dominique Pelle, closes vim/vim#1631)

https://github.com/vim/vim/commit/478af67dd6a9adc456464c3736bda328ae3a28cb
2017-06-06 06:15:16 -04:00
James McCoy 5f8411b7bf vim-patch:8.0.0176
Problem:    Using :change in between :function and :endfunction fails.
Solution:   Recognize :change inside a function. (ichizok, closes vim/vim#1374)

https://github.com/vim/vim/commit/70bcd7336f9f19304f32c52a86ed5b4b3de852c2
2017-06-06 06:15:16 -04:00
James McCoy cb8efa4fef vim-patch:8.0.0360
Problem:    Sometimes VimL is used, which is confusing.
Solution:   Consistently use "Vim script". (Hirohito Higashi)

https://github.com/vim/vim/commit/b544f3c81f1e6a50322855681ac266ffaa8e313c
2017-06-06 06:15:16 -04:00