Commit Graph

54 Commits

Author SHA1 Message Date
dundargoc
4716a578ae docs: fix typos 2022-11-02 21:45:26 +08:00
zeertzjq
5559cabf4d vim-patch:8.2.0531: various errors not tested
Problem:    Various errors not tested.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#5895)

476a613135

Need to remove "F" flag from 'shortmess' as early as possible.
2022-10-27 00:14:02 +08:00
zeertzjq
157baef026 vim-patch:8.1.1826: tests use hand coded feature and option checks
Problem:    Tests use hand coded feature and option checks.
Solution:   Use the commands from check.vim in more tests.

8c5a278fc5

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>
2022-10-26 22:16:58 +08:00
zeertzjq
ef363ed37c vim-patch:8.2.0619: null dict is not handled like an empty dict
Problem:    Null dict is not handled like an empty dict.
Solution:   Fix the code and add tests. (Yegappan Lakshmanan, closes vim/vim#5968)

ea04a6e8ba

Nvim doesn't support modifying NULL list, so comment out a line.
2022-10-26 20:53:39 +08:00
zeertzjq
cfccae9584 vim-patch:8.2.0610: some tests are still old style
Problem:    Some tests are still old style.
Solution:   Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5957)

08f4157c5c

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.
2022-10-26 20:53:39 +08:00
zeertzjq
7b39ce36a4 vim-patch:8.2.0418: code in eval.c not sufficiently covered by tests
Problem:    Code in eval.c not sufficiently covered by tests.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5815)

8b63313510

Nvim does not have v:none, so comment out test for it.
2022-10-26 13:52:42 +08:00
zeertzjq
d40739843c vim-patch:8.2.0401: not enough test coverage for evalvars.c
Problem:    Not enough test coverage for evalvars.c.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5804)

8dfcce3a78

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.
2022-10-26 13:41:31 +08:00
zeertzjq
bcef006da6
vim-patch:9.0.0678: using exclamation marks on :function (#20518)
Problem:    Using exclamation marks on :function.
Solution:   Use :func and :endfunc as usual.
97f0eb169b

Add a missing change from patch 8.1.1875.
2022-10-07 07:06:38 +08:00
zeertzjq
d5328ea408
vim-patch:8.2.0522: several errors are not tested for (#19901)
Problem:    Several errors are not tested for.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#5892)
ee4e0c1e9a

Omit Test_range() change: reverted in patch 8.2.0615.
Cherry-pick Test_z_no_space_before_xxx() from patch 8.2.0195.
Cherry-pick Test_reverse_sort_uniq() change from patch 8.2.0183.
Make uniq() error behavior consistent with sort().
Cherry-pick Test_set_ttytype() change from patch 8.1.1826.
Cherry-pick quickfix checks from patch 8.1.2373 to test_preview.vim.
Test_viminfo_error() is applicable.
Cherry-pick E1058 from patch 8.2.0149 and port Test_deep_nest() to Lua.
2022-08-23 10:38:53 +08:00
zeertzjq
3a8b859147 vim-patch:8.2.0078: expanding <sfile> works differently the second time
Problem:    Expanding <sfile> works differently the second time.
Solution:   Keep the expanded name when redefining a function. (closes vim/vim#5425)
b9adef79ec
2022-08-14 04:29:44 +08:00
zeertzjq
02a4974418
vim-patch:7.4.1168 (#19645)
Problem:    This doesn't give the right result: eval(string(v:true)). (Nikolay
            Pavlov)
Solution:   Make the string "v:true" instead of "true".
f48aa160fd
2022-08-13 21:31:00 +08:00
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)
a42e6e0082

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)
818fc9ad14

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)
bc2b71d44a
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)
9f6277bdde

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)
93344c2d70

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.
1e1153600c

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.
155500077c

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.
6650a69454

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)
767d8c1a1a

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.
65591001e4

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.
0436922965

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.
6039c7f053

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)
17a13437c9

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.
74e54fcb44

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().
175a41c13f
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.
073e4b92e6

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)
1f068233c1
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.
7e0868efcf

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)
82f654e092

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)
b6fb0516ec

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)
5055c56cfb

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)
c753478b82

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)
ce7be3a0e6
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)
7d491c4253
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)
6e5000d493
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)
34059e7b67
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)
bc2cfe4672
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)
e21c1580b7
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.
3020a87cb1
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.
5d7ead3bc8
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)
ff697e6cef
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)
bb3e6416f1
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.
f8be461d02
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)
53564f7c1a
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)
6f9a476b2f
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.

d6abcd154c
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.
663bb23316

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)

863e80b445
2017-06-06 07:39:33 -04:00