Commit Graph

16 Commits

Author SHA1 Message Date
zeertzjq
4e8efe002e
vim-patch:9.1.0666: assert_equal() doesn't show multibyte string correctly (#30018)
Problem:  assert_equal() doesn't show multibyte string correctly
Solution: Properly advance over a multibyte char.
          (zeertzjq)

closes: vim/vim#15456

9c4b2462bb
2024-08-10 06:35:51 +08:00
zeertzjq
a553b36876
vim-patch:7.4.1565 (#29734)
Problem:    Crash when assert_equal() runs into a NULL string.
Solution:   Check for NULL. (Dominique) Add a test.

f155196444

Use the latest version of the test from Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-07-16 03:44:17 +00:00
zeertzjq
50b069a8b9 vim-patch:9.0.0380: deleting files in tests is a hassle
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>
2023-08-22 18:56:43 +08:00
zeertzjq
ca5a810c4a
vim-patch:9.0.1511: crash when using wrong arg types to assert_match() (#23507)
Problem:    Crash when using wrong arg types to assert_match().
Solution:   Check for NULL pointer. (closes vim/vim#12349)

12e7a1fe75
2023-05-06 20:00:17 +08:00
zeertzjq
c11417b3d7 vim-patch:9.0.1507: assert message is confusing with boolean result
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)

53f5e51628

Move assert_type_T to testing.c and remove ASSERT_INRANGE.
2023-05-05 19:43:16 +08:00
zeertzjq
49c3eb01ab vim-patch:9.0.0854: no proper test for what 9.0.0846 fixes
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.
            (closes vim/vim#11523)

7265851b2b
2023-05-05 19:43:13 +08:00
zeertzjq
49a2bb9117 vim-patch:9.0.0846: using assert_fails() may cause hit-enter prompt
Problem:    Using assert_fails() may cause hit-enter prompt.
Solution:   Set no_wait_return. (closes vim/vim#11522)

f220643c26

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjq
050b24cbcc vim-patch:9.0.0543: insufficient testing for assert and test functions
Problem:    Insufficient testing for assert and test functions.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/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>
2023-05-05 19:43:13 +08:00
zeertzjq
5fb6b3431a vim-patch:9.0.0404: crash when passing invalid arguments to assert_fails()
Problem:    Crash when passing invalid arguments to assert_fails().
Solution:   Check for NULL string.

1540d334a0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjq
17c8e39f88 vim-patch:9.0.0213: using freed memory with error in assert argument
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>
2023-05-05 19:43:13 +08:00
zeertzjq
0a3a2132d4 vim-patch:8.2.1953: Vim9: extra "unknown" error after other error
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()

631e8f9345

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:10 +08:00
zeertzjq
d79e726212
vim-patch:8.2.4397: crash when using many composing characters in error message (#23481)
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>
2023-05-05 06:22:37 +08:00
zeertzjq
f6299e9d6e
vim-patch:8.2.3221: Vim9: argument types are not checked at compile time (#23480)
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks. (Yegappan Lakshmanan, closes vim/vim#8632)

a764e73d4f

Cherry-pick test_assert.vim change from patch 8.2.3229.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-05-05 06:22:18 +08:00
zeertzjq
b16729f816
vim-patch:8.2.1697: inconsistent capitalization of error messages (#23476)
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>
2023-05-04 23:17:43 +08:00
zeertzjq
7e0d668012
vim-patch:partial:9.0.0359: error message for wrong argument type is not specific (#23315)
Problem:    Error message for wrong argument type is not specific.
Solution:   Include more information in the error. (Yegappan Lakshmanan,
            closes vim/vim#11037)

8deb2b30c7

Skip reduce() and deepcopy() changes because of missing patches.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-25 23:39:15 +08:00
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00