| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- reduce variable scope
- prefer initialization over declaration and assignment
|
|
|
|
| |
Biggest change is that uncrustify is silent during linting.
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
|
|
|
| |
It has not been used for a long time and the likelihood of it still working is
low.
|
|
|
|
|
| |
Replace usage of STR{CPY,CAT} with xstrl{cpy,cat} when using on IObuff
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
|
|
|
|
|
| |
Problem: Crash when using wrong arg types to assert_match().
Solution: Check for NULL pointer. (closes vim/vim#12349)
https://github.com/vim/vim/commit/12e7a1fe7527e9e59adbe248a95b4b532e3ec58c
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Assert message is confusing with boolean result. assert_inrange()
replaces message instead of adding it.
Solution: Don't put quotes around expected boolean value. Append message
for assert_inrange(). (closes vim/vim#12342, closes vim/vim#12341)
https://github.com/vim/vim/commit/53f5e51628b56ef9171671cd6e9970374036a084
Move assert_type_T to testing.c and remove ASSERT_INRANGE.
|
|
|
|
|
|
|
|
|
| |
Problem: Using assert_fails() may cause hit-enter prompt.
Solution: Set no_wait_return. (closes vim/vim#11522)
https://github.com/vim/vim/commit/f220643c260d55d21a841a3c4032daadc41bc50b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Crash when passing invalid arguments to assert_fails().
Solution: Check for NULL string.
https://github.com/vim/vim/commit/1540d334a04d874c2aa9d26b82dbbcd4bc5a78de
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Using freed memory with error in assert argument.
Solution: Make a copy of the error.
https://github.com/vim/vim/commit/249e1b903a9c0460d618f6dcc59aeb8c03b24b20
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: extra "unknown" error after other error.
Solution: Restore did_emsg count after EXEC instruction. (closes vim/vim#7254)
Improve error message from assert_fails()
https://github.com/vim/vim/commit/631e8f93458b102091d54c502f489c03e454d4da
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
message (#23481)
Problem: Crash when using many composing characters in error message.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
https://github.com/vim/vim/commit/34f8117dec685ace52cd9e578e2729db278163fc
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#23480)
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closes vim/vim#8632)
https://github.com/vim/vim/commit/a764e73d4ffc5d046807c757eaacb9b0a5408152
Cherry-pick test_assert.vim change from patch 8.2.3229.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Inconsistent capitalization of error messages.
Solution: Always start with a capital.
https://github.com/vim/vim/commit/7707228aace9aff16434edf5377a354c6ad07316
Most of these errors are Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
| |
message.c functions now take const char * as a format. Error message
definitions can be made const.
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
| |
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11879)
https://github.com/vim/vim/commit/032713f8299abd92fcfb1e490d1ae5c1ecadde41
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
| |
A blob is used as a sequence of bytes and usually accessed individually,
not as as a NUL-terminuated string, so uint8_t should be better.
Not sure about ga_append(), but using uint8_t leads to fewer casts.
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Interrupt not caught in test.
Solution: Consider an exception thrown in the current try/catch when got_int
is set. Also catch early exit when not using try/catch.
https://github.com/vim/vim/commit/8bea171f154845046239c61bdef50a8e0f12f643
Cherry-pick test changes from patch 8.2.0557.
https://github.com/vim/vim/commit/bfe13ccc58ccb96f243a58309800410db1ccb52c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
| |
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
|
|
|
|
|
|
|
|
|
|
|
|
| |
execution (#20998)
Problem: Assert_fails() setting emsg_silent changes normal execution.
Solution: Use a separate flag in_assert_fails.
https://github.com/vim/vim/commit/28ee892ac4197421b3317f195512ca64cc56a5b4
Cherry-pick no_wait_return from patch 9.0.0846.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
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.
https://github.com/vim/vim/commit/44d6652d561d628d12e3ff7f6636ea7d1f805ced
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.
https://github.com/vim/vim/commit/9bd5d879c2ecfbdbb168b090e12f4b89724a302e
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.
https://github.com/vim/vim/commit/9b02d64cff7664b9643205d6e23b08da688fe87a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
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().
https://github.com/vim/vim/commit/1d634542cf5ebcd1d5d83bd124b3e1d5e7c96c58
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Not all assert functions are fully tested.
Solution: Test more assert functions.
https://github.com/vim/vim/commit/7177da9dd4d9a521c6141c6fbf7e9a4d6296ab05
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.
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
| |
|
|
|
|
|
|
| |
Problem: Expand('<stack>') does not include the final line number.
Solution: Add the line nuber. (closes vim/vim#6927)
https://github.com/vim/vim/commit/4f25b1aba050b85fa97ca2316aa04dd4b0b22530
|
|
|
|
|
|
|
|
|
| |
Problem: When a test fails it's often not easy to see what the call stack
is.
Solution: Add more entries from the call stack in the exception message.
https://github.com/vim/vim/commit/a5d0423fa16f18b4576a2a07e50034e489587a7d
Use docs from latest Vim.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Execution stack is incomplete and inefficient.
Solution: Introduce a proper execution stack and use it instead of
sourcing_name/sourcing_lnum. Create a string only when used.
https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506
Omit test_debugger.vim: superseded by later patches.
Omit check_map_keycodes(): N/A.
Omit kword_test.c: N/A (converted to a unit test).
|
|
|
|
|
|
|
| |
(#19317)
Problem: Assert_equal() output for dicts is hard to figure out.
Solution: Only show the different items.
https://github.com/vim/vim/commit/4a021dfbeee88ac09d07e257912485314ecdcabe
|
|
|
|
|
| |
Problem: Saving and restoring called_emsg is clumsy.
Solution: Count the number of error messages.
https://github.com/vim/vim/commit/53989554a44caca0964376d60297f08ec257c53c
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
|
| |
|
|
Problem: The evalfunc.c file is too big.
Solution: Move testing support to a separate file.
https://github.com/vim/vim/commit/ecaa70ea29c269dd0dabd3cd5acdfa0ce42ccd54
|