Problem: Deleting files in tests is a hassle.
Solution: Use the new 'D' flag of writefile().
e1f3ab73bc
vim-patch:e1f3ab73bc7c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
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(). (closesvim/vim#12342, closesvim/vim#12341)
53f5e51628
Move assert_type_T to testing.c and remove ASSERT_INRANGE.
Problem: No proper test for what 9.0.0846 fixes.
Solution: Run test in a terminal so that the hit-enter prompt can show up.
(closesvim/vim#11523)
7265851b2b
Problem: Using assert_fails() may cause hit-enter prompt.
Solution: Set no_wait_return. (closesvim/vim#11522)
f220643c26
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Insufficient testing for assert and test functions.
Solution: Add a few more tests. (Yegappan Lakshmanan, closesvim/vim#11190)
e24b5e0b0f
Cherry-pick E1219 from patch 8.2.3229.
Cherry-pick test_assert.vim change from patch 9.0.0491.
Cherry-pick the whole Test_refcount() function and skip it.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Using freed memory with error in assert argument.
Solution: Make a copy of the error.
249e1b903a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when using many composing characters in error message.
Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
34f8117dec
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: argument types are not checked at compile time.
Solution: Add several more type checks. (Yegappan Lakshmanan, closesvim/vim#8632)
a764e73d4f
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.
7707228aac
Most of these errors are Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Error message for wrong argument type is not specific.
Solution: Include more information in the error. (Yegappan Lakshmanan,
closesvim/vim#11037)
8deb2b30c7
Skip reduce() and deepcopy() changes because of missing patches.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>