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, closesvim/vim#10071)
2b74b6805b
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
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>
Problem: Test for strchars() fails with different error number.
Solution: Adjust the error number.
707be5f352
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>
Problem: Cannot scroll a popup window to the very bottom.
Solution: Scroll to the bottom when the "firstline" property was set to -1.
(closesvim/vim#4577) Allow resetting min/max width/height.
8c6173c7d3
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: E1281 not tested with the old regexp engine.
Solution: Loop over the values of 'regexp'. (Dominique Pellé, closesvim/vim#10695)
3a393790a4
Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
Problem: No error if engine selection atom is not at the start.
Solution: Give an error. (Christian Brabandt, closesvim/vim#10439)
360da40b47
Co-authored-by: Christian Brabandt <cb@256bit.org>
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>
Problem: Error for missing :endif when an exception was thrown. (Dani
Dickstein)
Solution: Do not give an error when aborting. (closesvim/vim#10490)
bf79a4e48d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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>
Problem: Duplicated code for adding buffer lines.
Solution: Move code to a common function. Also move map functions to map.c.
(Yegappan Lakshmanan, closesvim/vim#8665)
4a15504e91
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
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>
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>
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>
Problem: Vim9: error for list index uses wrong line number.
Solution: Set source line number. (closesvim/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>
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>
Problem: Regexp benchmark stest is old style.
Solution: Make it a new style test. Fix using a NULL list. Add more tests.
(Yegappan Lakshmanan, closesvim/vim#5963)
ad48e6c159
N/A patches:
vim-patch:9.0.0829: wrong counts in macro 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>
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.
Problem: Not enough tests for buffer writing.
Solution: Add more tests. Use CheckRunVimInTerminal in more places.
(Yegappan Lakshmanan, closesvim/vim#6167)
494e9069cb
Problem: Insufficient testing for invalid function arguments.
Solution: Add more tests. (Yegappan Lakshmanan, closesvim/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.
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
Problem: Various parts of code not covered by tests.
Solution: Add more tests. (Yegappan Lakshmanan, closesvim/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.
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.
Problem: Various functions not properly tested.
Solution: Add more tests, especially for failures. (Yegappan Lakshmanan,
closesvim/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.