diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-23 07:33:58 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-10-23 07:38:10 +0800 |
commit | c1330816dc159b69cff9e149c2a06b328a91860c (patch) | |
tree | 61cbd6bb560cfecf169aa29d326d02a1df5f7f83 | |
parent | 629a5b71b55e439392e2a5791940f6dc8d0dd7c0 (diff) | |
download | rneovim-c1330816dc159b69cff9e149c2a06b328a91860c.tar.gz rneovim-c1330816dc159b69cff9e149c2a06b328a91860c.tar.bz2 rneovim-c1330816dc159b69cff9e149c2a06b328a91860c.zip |
vim-patch:9.1.0799: tests: gettwinvar()/gettabwinvar() tests are not comprehensive
Problem: tests: gettwinvar()/gettabwinvar() tests are not comprehensive
Solution: Add more tests (Milly)
closes: vim/vim#15920
https://github.com/vim/vim/commit/ceec8640df0f75c6e7759fbb3d7a1064313321fb
Co-authored-by: Milly <milly.ca@gmail.com>
-rw-r--r-- | test/old/testdir/test_getvar.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/old/testdir/test_getvar.vim b/test/old/testdir/test_getvar.vim index 56f737ab9c..de00281ba3 100644 --- a/test/old/testdir/test_getvar.vim +++ b/test/old/testdir/test_getvar.vim @@ -22,6 +22,12 @@ func Test_var() call assert_equal('Chance', getwinvar(9, '', def_str)) call assert_equal(0, getwinvar(1, '&nu')) call assert_equal(0, getwinvar(1, '&nu', 1)) + call assert_match(v:t_dict, type(getwinvar(1, '&'))) + call assert_match(v:t_dict, type(getwinvar(1, '&', def_str))) + call assert_equal('', getwinvar(9, '&')) + call assert_equal('Chance', getwinvar(9, '&', def_str)) + call assert_equal('', getwinvar(1, '&nux')) + call assert_equal('Chance', getwinvar(1, '&nux', def_str)) unlet def_str " test for gettabvar() @@ -83,7 +89,12 @@ func Test_var() unlet def_dict + call assert_match(v:t_dict, type(gettabwinvar(2, 3, '&'))) + call assert_match(v:t_dict, type(gettabwinvar(2, 3, '&', 1))) call assert_equal("", gettabwinvar(9, 2020, '')) + call assert_equal(1, gettabwinvar(9, 2020, '', 1)) + call assert_equal('', gettabwinvar(9, 2020, '&')) + call assert_equal(1, gettabwinvar(9, 2020, '&', 1)) call assert_equal('', gettabwinvar(2, 3, '&nux')) call assert_equal(1, gettabwinvar(2, 3, '&nux', 1)) tabonly |