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

https://github.com/vim/vim/commit/9c4b2462bb498f44044616f7309d111d12170369
2024-08-10 06:35:51 +08:00
zeertzjqandBram Moolenaar 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.

https://github.com/vim/vim/commit/f1551964448607f8222de2d8f0992ea43eb2fe67

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
zeertzjqandBram Moolenaar 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().

https://github.com/vim/vim/commit/e1f3ab73bc7c4b3eee03b673c2983ed7eca6ea80

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)

https://github.com/vim/vim/commit/12e7a1fe7527e9e59adbe248a95b4b532e3ec58c
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)

https://github.com/vim/vim/commit/53f5e51628b56ef9171671cd6e9970374036a084

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)

https://github.com/vim/vim/commit/7265851b2b4e5a63c0a02a9057dee237502ee557
2023-05-05 19:43:13 +08:00
zeertzjqandBram Moolenaar 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)

https://github.com/vim/vim/commit/f220643c260d55d21a841a3c4032daadc41bc50b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjqandYegappan Lakshmanan 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)

https://github.com/vim/vim/commit/e24b5e0b0f5ab015215ef2761baa98ccb1ba8606

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
zeertzjqandBram Moolenaar 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.

https://github.com/vim/vim/commit/1540d334a04d874c2aa9d26b82dbbcd4bc5a78de

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjqandBram Moolenaar 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.

https://github.com/vim/vim/commit/249e1b903a9c0460d618f6dcc59aeb8c03b24b20

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:13 +08:00
zeertzjqandBram Moolenaar 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()

https://github.com/vim/vim/commit/631e8f93458b102091d54c502f489c03e454d4da

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 19:43:10 +08:00
zeertzjqandBram Moolenaar 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().

https://github.com/vim/vim/commit/34f8117dec685ace52cd9e578e2729db278163fc

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-05 06:22:37 +08:00
zeertzjqandYegappan Lakshmanan 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)

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>
2023-05-05 06:22:18 +08:00
zeertzjqandBram Moolenaar b16729f816 vim-patch:8.2.1697: inconsistent capitalization of error messages (#23476)
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>
2023-05-04 23:17:43 +08:00
zeertzjqandYegappan Lakshmanan 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)

https://github.com/vim/vim/commit/8deb2b30c77035bb682ccf80b781455ac1d6038b

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