summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_execute_func.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:40:16 +0000
commit6af24b2457752c0d36aaf9f29f03d39afd09937f (patch)
tree2671b594908d1f971de6b2a2d473f97dfb7291d2 /src/testdir/test_execute_func.vim
parentReleasing progress-linux version 2:9.1.0016-1~progress7.99u1. (diff)
downloadvim-6af24b2457752c0d36aaf9f29f03d39afd09937f.tar.xz
vim-6af24b2457752c0d36aaf9f29f03d39afd09937f.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_execute_func.vim')
-rw-r--r--src/testdir/test_execute_func.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/testdir/test_execute_func.vim b/src/testdir/test_execute_func.vim
index 09b976b..faaace0 100644
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -204,4 +204,28 @@ func Test_execute_func_with_null()
endif
endfunc
+func Test_win_execute_tabpagewinnr()
+ belowright split
+ tab split
+ belowright split
+ call assert_equal(2, tabpagewinnr(1))
+
+ tabprevious
+ wincmd p
+ call assert_equal(1, tabpagenr())
+ call assert_equal(1, tabpagewinnr(1))
+ call assert_equal(2, tabpagewinnr(2))
+
+ call win_execute(win_getid(1, 2),
+ \ 'call assert_equal(2, tabpagenr())'
+ \ .. '| call assert_equal(1, tabpagewinnr(1))'
+ \ .. '| call assert_equal(1, tabpagewinnr(2))')
+
+ call assert_equal(1, tabpagenr())
+ call assert_equal(1, tabpagewinnr(1))
+ call assert_equal(2, tabpagewinnr(2))
+
+ %bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab