Commit Graph

20 Commits

Author SHA1 Message Date
zeertzjq
db64280be5 vim-patch:8.2.3908: cannot use a script-local function for 'foldtext'
Problem:    Cannot use a script-local function for 'foldtext'.
Solution:   Expand "s:" and "<SID>". (Yegappan Lakshmanan, closes vim/vim#9411)

27708e6c7b

Cherry-pick test_filter_map.vim change from patch 8.2.3871.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-17 13:14:32 +08:00
zeertzjq
842a47d6a4
vim-patch:9.0.1704: Cannot use positional arguments for printf() (#24719)
Problem: Cannot use positional arguments for printf()
Solution: Support positional arguments in string formatting

closes: vim/vim#12140

0c6181fec4

Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-08-15 19:16:19 +08:00
zeertzjq
625926f729 vim-patch:9.0.1524: passing -1 for bool is not always rejected
Problem:    Passing -1 for bool is not always rejected.
Solution:   Check for error in a better way. (closes vim/vim#12358)

8cf51376b8
2023-05-08 22:53:43 +08:00
zeertzjq
d745433817 vim-patch:9.0.1522: some functions give two error messages
Problem:    Some functions give two error messages.
Solution:   Do not give a second error message. (closes vim/vim#12352)

e4098457ab

It seems that tv_get_bool() is actually not exactly the same as
tv_get_number(), so change it to a function instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 22:49:32 +08:00
zeertzjq
066db5e7cd
vim-patch:9.0.1500: The falsy operator is not tested properly (#23407)
Problem:    The falsy operator is not tested properly.
Solution:   Add a few more test cases. (closes vim/vim#12319)

58a44751ce
2023-04-30 23:24:16 +08:00
zeertzjq
9f29176033
vim-patch:9.0.1492: using uninitialized memory when argument is missing (#23351)
Problem:    Using uninitialized memory when argument is missing.
Solution:   Check there are sufficient arguments before the base.
            (closes vim/vim#12302)

b7f2270bab

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-28 00:01:22 +08:00
zeertzjq
43c49746d9
vim-patch:9.0.0335: checks for Dictionary argument often give a vague error (#23309)
Problem:    Checks for Dictionary argument often give a vague error message.
Solution:   Give a useful error message. (Yegappan Lakshmanan, closes vim/vim#11009)

04c4c5746e

Cherry-pick removal of E922 from docs from patch 9.0.1403.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-04-25 21:32:12 +08:00
zeertzjq
ef9af89da7 vim-patch:8.2.4930: interpolated string expression requires escaping
Problem:    Interpolated string expression requires escaping.
Solution:   Do not require escaping in the expression.

0abc2871c1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 18:19:17 +08:00
zeertzjq
bacb5021d4 vim-patch:8.2.4883: string interpolation only works in heredoc
Problem:    String interpolation only works in heredoc.
Solution:   Support interpolated strings.  Use syntax for heredoc consistent
            with strings, similar to C#. (closes vim/vim#10327)

2eaef106e4

Cherry-pick Test_Debugger_breakadd_expr() from Vim.

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-04-15 17:59:32 +08:00
zeertzjq
1b556c04bf vim-patch:8.2.4476: operator name spelled wrong
Problem:    Operator name spelled wrong.
Solution:   Change trinary to ternary. (Goc Dundar, closes vim/vim#9850)

e41c1dd889

Co-authored-by: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com>
2023-04-15 17:15:04 +08:00
zeertzjq
408e5d16a9 vim-patch:8.2.4373: expression test fails
Problem:    Expression test fails.
Solution:   Make the test work with latest Vim9 syntax.

c87aa34dfd

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:14:49 +08:00
zeertzjq
b29df57ba7 vim-patch:8.2.4361: Vim9: some tests fail
Problem:    Vim9: some tests fail.
Solution:   Fix the tests, mostly by removing "s:".

62b191c387

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:14:30 +08:00
zeertzjq
f04125a935 vim-patch:8.2.3856: Vim9: not enough tests
Problem:    Vim9: not enough tests.
Solution:   Run more expression tests also with Vim9. Fix an uncovered
            problem.

fea43e44c0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:09:42 +08:00
zeertzjq
700152fbf8 vim-patch:8.2.1378: cannot put space between function name and paren
Problem:    Cannot put space between function name and paren.
Solution:   Allow this for backwards compatibility.

bbd3e3c357

This fixes a regression from patch 8.2.1365, which isn't ported yet.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 17:09:41 +08:00
zeertzjq
85741677c8 vim-patch:8.2.0634: crash with null partial and blob
Problem:    Crash with null partial and blob.
Solution:   Check for NULL pointer.  Add more tests. (Yegappan Lakshmanan,
            closes vim/vim#5984)

92b83ccfda

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:48:30 +08:00
zeertzjq
4b49f312a0 vim-patch:8.2.0633: crash when using null partial in filter()
Problem:    Crash when using null partial in filter().
Solution:   Fix crash.  Add more tests. (Yegappan Lakshmanan, closes vim/vim#5976)

9d8d0b5c64

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-15 13:31:10 +08:00
zeertzjq
f12afd8e16 vim-patch:8.2.1798: Vim9: trinary operator condition is too permissive
Problem:    Vim9: trinary operator condition is too permissive.
Solution:   Use tv_get_bool_chk().

1310660557

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-14 18:04:12 +08:00
zeertzjq
d6e2804ab4 vim-patch:8.2.1794: no falsy Coalescing operator
Problem:    No falsy Coalescing operator.
Solution:   Add the "??" operator.  Fix mistake with function argument count.

92f26c256e

Cherry-pick tv2bool() into eval/typval.c.
Cherry-pick *??* tag from Vim runtime.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-04-14 18:04:09 +08:00
zeertzjq
3ad8458824
vim-patch:8.2.1067: expression "!expr->func()" does not work (#22585)
Problem:    Expression "!expr->func()" does not work.
Solution:   Apply plus and minus earlier. (closes vim/vim#6348)

0b1cd52ff6

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-03-09 13:47:01 +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