comparison src/testdir/test_vim9_builtin.vim @ 29894:d8fc1effa724 v9.0.0285

patch 9.0.0285: it is not easy to change the command line from a plugin Commit: https://github.com/vim/vim/commit/07ea5f1509fe8dafe3262ed2702b4d0fc99e288b Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Sat Aug 27 12:22:25 2022 +0100 patch 9.0.0285: it is not easy to change the command line from a plugin Problem: It is not easy to change the command line from a plugin. Solution: Add setcmdline(). (Shougo Matsushita, closes https://github.com/vim/vim/issues/10869)
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Aug 2022 13:30:04 +0200
parents 8dca33bca038
children b366b19d1a3e
comparison
equal deleted inserted replaced
29893:0ee1b461d692 29894:d8fc1effa724
3655 var d: dict<any> = {char: 'x', forward: 1, until: 1} 3655 var d: dict<any> = {char: 'x', forward: 1, until: 1}
3656 setcharsearch(d) 3656 setcharsearch(d)
3657 assert_equal(d, getcharsearch()) 3657 assert_equal(d, getcharsearch())
3658 enddef 3658 enddef
3659 3659
3660 def Test_setcmdline()
3661 v9.CheckDefAndScriptSuccess(['setcmdline("ls", 2)'])
3662 v9.CheckDefAndScriptFailure(['setcmdline(123)'], ['E1013: Argument 1: type mismatch, expected string but got number', 'E928: String required'])
3663 v9.CheckDefAndScriptFailure(['setcmdline("ls", "x")'], ['E1013: Argument 2: type mismatch, expected number but got string', 'E1030: Using a String as a Number'])
3664 enddef
3665
3660 def Test_setcmdpos() 3666 def Test_setcmdpos()
3661 v9.CheckDefAndScriptFailure(['setcmdpos("x")'], ['E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1']) 3667 v9.CheckDefAndScriptFailure(['setcmdpos("x")'], ['E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1'])
3662 enddef 3668 enddef
3663 3669
3664 def Test_setcursorcharpos() 3670 def Test_setcursorcharpos()