Patch 8.2.1569
Problem: Vim9: fixes for functions not tested; failure in getchangelist().
Solution: Add tests. (closes #6813, closes #6815, closes #6817)
Files: src/evalfunc.c, src/testdir/test_vim9_func.vim
*** ../vim-8.2.1568/src/evalfunc.c 2020-08-30 15:49:12.154736331 +0200
--- src/evalfunc.c 2020-09-02 20:57:41.333071308 +0200
***************
*** 3081,3092 ****
if (argvars[0].v_type == VAR_UNKNOWN)
buf = curbuf;
else
! {
! (void)tv_get_number(&argvars[0]); // issue errmsg if type error
! ++emsg_off;
! buf = tv_get_buf(&argvars[0], FALSE);
! --emsg_off;
! }
if (buf == NULL)
return;
--- 3081,3087 ----
if (argvars[0].v_type == VAR_UNKNOWN)
buf = curbuf;
else
! buf = tv_get_buf_from_arg(&argvars[0]);
if (buf == NULL)
return;
*** ../vim-8.2.1568/src/testdir/test_vim9_func.vim 2020-09-01
23:16:27.451424408 +0200
--- src/testdir/test_vim9_func.vim 2020-09-02 20:56:20.941315560 +0200
***************
*** 1431,1436 ****
--- 1431,1469 ----
assert_equal(123, getbufvar('%', 'myvar'))
enddef
+ def Test_bufwinid()
+ let origwin = win_getid()
+ below split SomeFile
+ let SomeFileID = win_getid()
+ below split OtherFile
+ below split SomeFile
+ assert_equal(SomeFileID, bufwinid('SomeFile'))
+
+ win_gotoid(origwin)
+ only
+ bwipe SomeFile
+ bwipe OtherFile
+ enddef
+
+ def Test_getbufline()
+ e SomeFile
+ let buf = bufnr()
+ e #
+ let lines = ['aaa', 'bbb', 'ccc']
+ setbufline(buf, 1, lines)
+ assert_equal(lines, getbufline('#', 1, '$'))
+
+ bwipe!
+ enddef
+
+ def Test_getchangelist()
+ new
+ setline(1, 'some text')
+ let changelist = bufnr()->getchangelist()
+ assert_equal(changelist, getchangelist('%'))
+ bwipe!
+ enddef
+
def Test_setreg()
setreg('a', ['aaa', 'bbb', 'ccc'])
let reginfo = getreginfo('a')
*** ../vim-8.2.1568/src/version.c 2020-09-02 19:58:56.346255979 +0200
--- src/version.c 2020-09-02 20:48:14.730888997 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1569,
/**/
--
Futility Factor: No experiment is ever a complete failure - it can always
serve as a negative example.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202009021903.082J308S3670978%40masaka.moolenaar.net.