Skip to content

Commit ceec864

Browse files
Millychrisbra
authored andcommitted
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: #15920 Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 92b59c6 commit ceec864

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/testdir/test_getvar.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ func Test_var()
2222
call assert_equal('Chance', getwinvar(9, '', def_str))
2323
call assert_equal(0, getwinvar(1, '&nu'))
2424
call assert_equal(0, getwinvar(1, '&nu', 1))
25+
call assert_match(v:t_dict, type(getwinvar(1, '&')))
26+
call assert_match(v:t_dict, type(getwinvar(1, '&', def_str)))
27+
call assert_equal('', getwinvar(9, '&'))
28+
call assert_equal('Chance', getwinvar(9, '&', def_str))
29+
call assert_equal('', getwinvar(1, '&nux'))
30+
call assert_equal('Chance', getwinvar(1, '&nux', def_str))
2531
unlet def_str
2632

2733
" test for gettabvar()
@@ -83,7 +89,12 @@ func Test_var()
8389

8490
unlet def_dict
8591

92+
call assert_match(v:t_dict, type(gettabwinvar(2, 3, '&')))
93+
call assert_match(v:t_dict, type(gettabwinvar(2, 3, '&', 1)))
8694
call assert_equal("", gettabwinvar(9, 2020, ''))
95+
call assert_equal(1, gettabwinvar(9, 2020, '', 1))
96+
call assert_equal('', gettabwinvar(9, 2020, '&'))
97+
call assert_equal(1, gettabwinvar(9, 2020, '&', 1))
8798
call assert_equal('', gettabwinvar(2, 3, '&nux'))
8899
call assert_equal(1, gettabwinvar(2, 3, '&nux', 1))
89100
tabonly

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
799,
707709
/**/
708710
798,
709711
/**/

0 commit comments

Comments
 (0)