summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-29 21:44:40 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-29 21:44:40 +0200
commit868b7b6712ea4f2232eeeae18c5cbbbddf2ee84d (patch)
treebec62dd676992d5c152d3fc6df333f95f0393a98 /src/testdir
parent1bbebab5255b5300d727c9b3f1b308205847dafd (diff)
downloadvim-git-868b7b6712ea4f2232eeeae18c5cbbbddf2ee84d.tar.gz
patch 8.1.1418: win_execute() is not implemented yetv8.1.1418
Problem: Win_execute() is not implemented yet. Solution: Implement it.
Diffstat (limited to 'src/testdir')
-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 b84fbebe5..78561b3a9 100644
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -78,3 +78,27 @@ func Test_execute_not_silent()
endfor
call assert_equal('xyz ', text2)
endfunc
+
+func Test_win_execute()
+ let thiswin = win_getid()
+ new
+ let otherwin = win_getid()
+ call setline(1, 'the new window')
+ call win_gotoid(thiswin)
+ let line = win_execute(otherwin, 'echo getline(1)')
+ call assert_match('the new window', line)
+
+ if has('textprop')
+ let popupwin = popup_create('the popup win', {'line': 2, 'col': 3})
+ redraw
+ let line = win_execute(popupwin, 'echo getline(1)')
+ call assert_match('the popup win', line)
+
+ call assert_fails('call win_execute(popupwin, "bwipe!")', 'E937:')
+
+ call popup_close(popupwin)
+ endif
+
+ call win_gotoid(otherwin)
+ bwipe!
+endfunc