patch 9.1.0799: tests: gettwinvar()/gettabwinvar() tests are not comprehensive

Commit: 
https://github.com/vim/vim/commit/ceec8640df0f75c6e7759fbb3d7a1064313321fb
Author: Milly <milly...@gmail.com>
Date:   Tue Oct 22 21:23:31 2024 +0200

    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...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/testdir/test_getvar.vim b/src/testdir/test_getvar.vim
index 6efb192eb..2ff13ef6e 100644
--- a/src/testdir/test_getvar.vim
+++ b/src/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
diff --git a/src/version.c b/src/version.c
index d09faf2b5..7a0b0ad1d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    799,
 /**/
     798,
 /**/

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1t3Ka4-000HtD-Ad%40256bit.org.

Raspunde prin e-mail lui