Commit Graph

23759 Commits

Author SHA1 Message Date
zeertzjq
8e868d699a vim-patch:8.2.4679: cannot have expandcmd() give an error message for mistakes
Problem:    Cannot have expandcmd() give an error message for mistakes.
Solution:   Add an optional argument to give errors. Fix memory leak when
            expanding files fails. (Yegappan Lakshmanan, closes vim/vim#10071)
2b74b6805b

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-05 18:06:00 +08:00
zeertzjq
781616bee5 vim-patch:8.2.2606: strchars() defaults to counting composing characters
Problem:    strchars() defaults to counting composing characters.
Solution:   Add strcharlen() which ignores composing characters.

70ce8a1561

Use docs from latest Vim instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:06:00 +08:00
zeertzjq
451850920b vim-patch:8.2.1626: test for strchars() fails with different error number
Problem:    Test for strchars() fails with different error number.
Solution:   Adjust the error number.

707be5f352

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:06:00 +08:00
zeertzjq
d857569dbd vim-patch:8.2.1624: Vim9: cannot pass "true" to split(), str2nr() and strchars()
Problem:    Vim9: cannot pass "true" to split(), str2nr() and strchars().
Solution:   Use tv_get_bool_chk(). (closes vim/vim#6884, closes vim/vim#6885, closes vim/vim#6886)

3986b94b09

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:06:00 +08:00
zeertzjq
38c113ae84 vim-patch:8.2.1600: Vim9: cannot use "true" with deepcopy()
Problem:    Vim9: cannot use "true" with deepcopy().
Solution:   Use tv_get_bool_chk(). (closes vim/vim#6867)

44b4a246b6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:06:00 +08:00
zeertzjq
e25193143b vim-patch:8.2.1751: using 2 where bool is expected may throw an error
Problem:    Using 2 where bool is expected may throw an error.
Solution:   Make this backwards compatible.

bade44e5ca

In legacy Vim script get_bool functions do the same thing as get_number
functions, so just add aliases using #define.

N/A patches for version.c:

vim-patch:8.2.1506: Vim9: no error when using a number other than 0 or 1 as bool

Problem:    Vim9: no error when using a number other than 0 or 1 as bool.
Solution:   Check the number is 0 or 1.

d70840ed68

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:06:00 +08:00
zeertzjq
562d572926 vim-patch:8.1.1949: cannot scroll a popup window to the very bottom
Problem:    Cannot scroll a popup window to the very bottom.
Solution:   Scroll to the bottom when the "firstline" property was set to -1.
            (closes vim/vim#4577)  Allow resetting min/max width/height.
8c6173c7d3

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:05:59 +08:00
zeertzjq
1bcddd5b53
Merge pull request #20943 from zeertzjq/vim-8.2.4688
vim-patch:8.2.{4688,4693,4978},9.0.0053: regexp fixes
2022-11-05 16:32:58 +08:00
zeertzjq
e33ffab1a7 vim-patch:9.0.0053: E1281 not tested with the old regexp engine
Problem:    E1281 not tested with the old regexp engine.
Solution:   Loop over the values of 'regexp'. (Dominique Pellé, closes vim/vim#10695)

3a393790a4

Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
2022-11-05 16:09:22 +08:00
zeertzjq
b84666d2a0 vim-patch:8.2.4978: no error if engine selection atom is not at the start
Problem:    No error if engine selection atom is not at the start.
Solution:   Give an error. (Christian Brabandt, closes vim/vim#10439)

360da40b47

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-11-05 16:09:22 +08:00
zeertzjq
77e25e56d8 vim-patch:8.2.4693: new regexp does not accept pattern "\%>0v"
Problem:    new regexp does not accept pattern "\%>0v".
Solution:   Do accept digit zero.

72bb10df1f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 16:09:22 +08:00
zeertzjq
78e69412ac vim-patch:8.2.4688: new regexp engine does not give an error for "\%v"
Problem:    New regexp engine does not give an error for "\%v".
Solution:   Check for a value argument. (issue vim/vim#10079)

91ff3d4f52

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 16:09:21 +08:00
zeertzjq
45a3e7f669
Merge pull request #20942 from zeertzjq/vim-8.2.5027
vim-patch:8.2.{3252,3919,5027}
2022-11-05 15:14:09 +08:00
zeertzjq
30cfdd0ea1 vim-patch:8.2.5027: error for missing :endif when an exception was thrown
Problem:    Error for missing :endif when an exception was thrown. (Dani
            Dickstein)
Solution:   Do not give an error when aborting. (closes vim/vim#10490)

bf79a4e48d

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 14:44:26 +08:00
zeertzjq
48405df046 vim-patch:8.2.3919: Vim9: wrong argument for append() results in two errors
Problem:    Vim9: wrong argument for append() results in two errors.
Solution:   Check did_emsg.  Also for setline().  Adjust the help for
            appendbufline().

8b6256f6ec

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 14:44:26 +08:00
zeertzjq
5731f406fa vim-patch:8.2.3252: duplicated code for adding buffer lines
Problem:    Duplicated code for adding buffer lines.
Solution:   Move code to a common function.  Also move map functions to map.c.
            (Yegappan Lakshmanan, closes vim/vim#8665)

4a15504e91

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-05 14:38:24 +08:00
zeertzjq
86fe2c8d94
Merge pull request #20941 from zeertzjq/vim-8.2.1183
vim-patch:8.2.{partial:1183,1184,1199,1479,1484,1631,1632}: assert_fails() patches
2022-11-05 14:17:06 +08:00
zeertzjq
6956971ec7 vim-patch:8.2.1632: not checking the context of test_fails()
Problem:    Not checking the context of test_fails().
Solution:   Add the line number and context arguments.  Give error if
            assert_fails() argument types are wrong.

44d6652d56

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:47:25 +08:00
zeertzjq
02f80d9a8a vim-patch:8.2.1631: test_fails() does not check the context of the line number
Problem:    test_fails() does not check the context of the line number.
Solution:   Use another argument to specify the context of the line number.

9bd5d879c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:45:43 +08:00
zeertzjq
8ba7a966a1 vim-patch:8.2.1484: flaky failure in assert_fails()
Problem:    Flaky failure in assert_fails().
Solution:   Only used fourth argument if there is a third argument.

9b02d64cff

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:41:20 +08:00
zeertzjq
0d8293364f vim-patch:8.2.1479: Vim9: error for list index uses wrong line number
Problem:    Vim9: error for list index uses wrong line number.
Solution:   Set source line number. (closes vim/vim#6724)  Add a way to assert the
            line number of the error with assert_fails().

1d634542cf

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:41:20 +08:00
zeertzjq
b33de61cc3 vim-patch:8.2.1199: not all assert functions are fully tested
Problem:    Not all assert functions are fully tested.
Solution:   Test more assert functions.

7177da9dd4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:31:31 +08:00
zeertzjq
159d52b433 vim-patch:8.2.1184: some tests fail
Problem:    Some tests fail.
Solution:   Adjust tests for different assert_fails() behavior.  Remove unused
            variable.

2b6ef856fb

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:27:56 +08:00
zeertzjq
8b0c5de4e0 vim-patch:partial:8.2.1183: assert_fails() checks the last error message
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.

9b7bf9e98f

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>
2022-11-05 12:27:45 +08:00
zeertzjq
a86295cd5c
vim-patch:8.2.0615: regexp benchmark stest is old style (#20940)
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)

ad48e6c159

N/A patches:
vim-patch:9.0.0829: wrong counts in macro comment
2022-11-05 12:26:17 +08:00
github-actions[bot]
daf9a63d67
version.c: update [skip ci] (#20825)
N/A patches:
vim-patch 9.0.0829: wrong counts in macro comment
2022-11-05 12:20:14 +08:00
zeertzjq
5004805156
Merge pull request #20939 from zeertzjq/vim-8.2.0502
vim-patch:8.2.{0502,0612}
2022-11-05 12:00:26 +08:00
zeertzjq
199c7c2898 vim-patch:8.2.0612: Vim9: no check for space before #comment
Problem:    Vim9: no check for space before #comment.
Solution:   Add space checks.

2c5ed4e330

Omit ends_excmd2(): the same as ends_excmd() in legacy Vim script.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 11:36:22 +08:00
zeertzjq
45ca7d4a62 vim-patch:8.2.0502: Vim9: some code is not tested
Problem:    Vim9: some code is not tested.
Solution:   Add more tests.  Fix uncovered problems.

e8c4abbbd7

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 11:27:17 +08:00
Gregory Anders
81722896e4
feat(clipboard): copy to system clipboard in tmux when supported (#20936)
Since version 3.2 tmux has had the ability to read/write buffer contents
from/to the system clipboard, if the underlying terminal emulator
supports it. Enable this feature when we can detect that tmux supports
it.
2022-11-04 20:43:11 -06:00
zeertzjq
5e86cf6c13
Merge pull request #20938 from zeertzjq/vim-8.2.0644
vim-patch:8.2.{0433,0644,0866,0958}: various tests
2022-11-05 09:49:52 +08:00
zeertzjq
b002499c19 vim-patch:8.2.0958: not sufficient testing for buffer writing
Problem:    Not sufficient testing for buffer writing.
Solution:   Add a few tests. (Yegappan Lakshmanan, closes vim/vim#6238)

1de5f7c81d
2022-11-05 09:25:31 +08:00
zeertzjq
40ca9b9528 vim-patch:8.2.0866: not enough tests for buffer writing
Problem:    Not enough tests for buffer writing.
Solution:   Add more tests. Use CheckRunVimInTerminal in more places.
            (Yegappan Lakshmanan, closes vim/vim#6167)

494e9069cb
2022-11-05 09:25:31 +08:00
zeertzjq
e30929cda5 vim-patch:8.2.0644: insufficient testing for invalid function arguments
Problem:    Insufficient testing for invalid function arguments.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5988)

99fa721944

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.
2022-11-05 09:25:31 +08:00
zeertzjq
b7b4914fe4 vim-patch:8.2.0433: INT signal not properly tested
Problem:    INT signal not properly tested.
Solution:   Add a test.  Also clean up some unnecessary lines. (Dominique
            Pelle, closes vim/vim#5828)

bad8804cdd
2022-11-05 09:25:31 +08:00
Will Spurgin
19a487bc86
fix(fileio): use first available directory in backupdir for backupcopy (#20655)
Fix backups failing for symlink files

Set backup to NULL prior to continuing & Clear backup prior to NULL set
to avoid leaking

Fixes #11349

Remove testing hacks in scripts for windows

Skip FreeBSD

Something appears up with these types of tests for FreeBSD on
Circus, see 2d6735d8ce
2022-11-05 09:24:34 +08:00
Lewis Russell
95f2f3cb5e
fix(vim.diff): fix fastforward off-by-1 (#20937) 2022-11-05 00:58:01 +00:00
zeertzjq
234b8c5f3d
Merge pull request #20934 from zeertzjq/vim-8.2.0968
vim-patch:8.2.{0968,0976,1022,1810,2901}: various tests
2022-11-04 21:49:43 +08:00
zeertzjq
2aafaa5992 vim-patch:8.2.2901: some operators not fully tested
Problem:    Some operators not fully tested.
Solution:   Add a few test cases. (Yegappan Lakshmanan, closes vim/vim#8282)

3e72dcad8b
2022-11-04 20:54:50 +08:00
zeertzjq
26a9f786c4 vim-patch:8.2.1810: some code in normal.c not covered by tests
Problem:    Some code in normal.c not covered by tests.
Solution:   Add normal mode tests. (Yegappan Lakshmanan, closes vim/vim#7086)

d7e5e9430a
2022-11-04 20:54:50 +08:00
zeertzjq
2476f41a4a vim-patch:8.2.1022: various parts of code not covered by tests
Problem:    Various parts of code not covered by tests.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6300)

845e0ee594

Omit test_iminsert.vim: the commit that created this file was N/A.
Omit test_viminfo.vim: the added tests are N/A.
2022-11-04 20:54:50 +08:00
zeertzjq
2b86ca81b4 vim-patch:8.2.0976: some 'cpoptions' not tested
Problem:    Some 'cpoptions' not tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6253)

df7df59d85
2022-11-04 20:54:50 +08:00
zeertzjq
32a2c556ab vim-patch:8.2.0968: no proper testing of the 'cpoptions' flags
Problem:    No proper testing of the 'cpoptions' flags.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#6251)

c9630d2658
2022-11-04 20:54:45 +08:00
dundargoc
0aba176171
ci: skip tests if build fails (#20908)
It's currently difficult to pinpoint the cause of a failure since all
tests are run even if the build steps fail. But since the build failed
the test will almost always fail as well as it's dependent on a
successful build, leading to many steps being marked as a failure even
though the real problem was the build step. Even worse, the default
behavior of GitHub Actions is to only automatically show the last failed
step, which is misleading if the build process fails since it'll show
the logs of the failing test step.

An easy solution would be to abort all subsequent steps if any steps
fail. This isn't optimal however, as we want all lint and test failures
to show on a single run instead of prematurely aborting on a single test
step.

We can solve both problems by dividing each job into two phases: the
build/installation phase and the test/lint phase, with a checkmark step
in between. The strategy is simple: if any step before the checkmark
step fails (the build phase), then abort all following steps. If any
step after the checkmark fails (the test phase), then show that test as
failed but continue running all tests.
2022-11-04 13:26:12 +01:00
zeertzjq
dce3fc3e9a
vim-patch:8.2.0540: regexp and other code not tested (#20930)
Problem:    Regexp and other code not tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5904)

004a6781b3
2022-11-04 19:31:58 +08:00
Lewis Russell
b854f2ce09
fix(vim.diff): correctly apply hunk offsets with linematch (#20931) 2022-11-04 11:12:17 +00:00
Lewis Russell
f1c864cfe3
fix(diff): remove size_t underflow (#20929) 2022-11-04 10:31:09 +00:00
zeertzjq
24fa5f70ed
vim-patch:8.2.0448: various functions not properly tested (#20926)
Problem:    Various functions not properly tested.
Solution:   Add more tests, especially for failures. (Yegappan Lakshmanan,
            closes vim/vim#5843)

0e05de4622

Cherry-pick test changes from patch 8.2.0427 and skip Test_has().
Cherry-pick Test_complete_wildmenu() change from patch 8.2.4339.
2022-11-04 18:17:26 +08:00
Jonathon
04fbb1de44
Enable new diff option linematch (#14537)
Co-authored-by: Lewis Russell <me@lewisr.dev>
2022-11-04 09:07:22 +00:00
Kevin Hwang
cc5b7368d6
fix(man.lua): set modifiable before writing page (#20914) 2022-11-03 09:13:29 +08:00