vim/openEuler-remove-failed-tests-due-to-patch.patch
2022-09-06 17:18:05 +08:00

780 lines
26 KiB
Diff

From ca7a7ce78d3c12d4c9ed458a7c67866be60aabe8 Mon Sep 17 00:00:00 2001
From: wangshouping <wangshouping@huawei.com>
Date: Sat, 6 Mar 2021 20:55:26 +0800
Subject: [PATCH] remove test cases of failure due to patch
reason: Remove test cases of failure due to vim-7.4-syntax.patch/
vim-8.0-copy-paste.patch/vim-7.4-syncolor.patch.
Signed-off-by: wangshouping <wangshouping@huawei.com>
---
src/testdir/test_balloon.vim | 47 ----
src/testdir/test_diffmode.vim | 181 ----------------
src/testdir/test_filetype.vim | 9 -
src/testdir/test_popupwin.vim | 285 -------------------------
src/testdir/test_popupwin_textprop.vim | 166 --------------
5 files changed, 688 deletions(-)
diff --git a/src/testdir/test_balloon.vim b/src/testdir/test_balloon.vim
index f32b73c..b7d1a15 100644
--- a/src/testdir/test_balloon.vim
+++ b/src/testdir/test_balloon.vim
@@ -17,50 +17,3 @@ let s:common_script =<< trim [CODE]
redraw
[CODE]
-func Test_balloon_eval_term()
- " Use <Ignore> after <MouseMove> to return from vgetc() without removing
- " the balloon.
- let xtra_lines =<< trim [CODE]
- set updatetime=300
- au CursorHold * echo 'hold fired'
- func Trigger()
- call test_setmouse(2, 6)
- call feedkeys("\<MouseMove>\<Ignore>", "xt")
- endfunc
- [CODE]
- call writefile(s:common_script + xtra_lines, 'XTest_beval')
-
- " Check that the balloon shows up after a mouse move
- let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
- call term_wait(buf, 100)
- call term_sendkeys(buf, 'll')
- call term_sendkeys(buf, ":call Trigger()\<CR>")
- call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
-
- " Make sure the balloon still shows after 'updatetime' passed and CursorHold
- " was triggered.
- call term_wait(buf, 300)
- call VerifyScreenDump(buf, 'Test_balloon_eval_term_01a', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XTest_beval')
-endfunc
-
-func Test_balloon_eval_term_visual()
- " Use <Ignore> after <MouseMove> to return from vgetc() without removing
- " the balloon.
- call writefile(s:common_script + [
- \ 'call test_setmouse(3, 6)',
- \ 'call feedkeys("3Gevfr\<MouseMove>\<Ignore>", "xt")',
- \ ], 'XTest_beval_visual')
-
- " Check that the balloon shows up after a mouse move
- let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols': 50})
- call term_wait(buf, 100)
- call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XTest_beval_visual')
-endfunc
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index 9dfe2fe..61edbe2 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -749,163 +749,6 @@ func VerifyInternal(buf, dumpfile, extra)
call VerifyScreenDump(a:buf, a:dumpfile, {})
endfunc
-func Test_diff_screen()
- CheckScreendump
- CheckFeature menu
-
- " clean up already existing swap files, just in case
- call delete('.Xfile1.swp')
- call delete('.Xfile2.swp')
-
- " Test 1: Add a line in beginning of file 2
- call WriteDiffFiles(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
- let buf = RunVimInTerminal('-d Xfile1 Xfile2', {})
- " Set autoread mode, so that Vim won't complain once we re-write the test
- " files
- call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
-
- call VerifyBoth(buf, 'Test_diff_01', '')
-
- " Test 2: Add a line in beginning of file 1
- call WriteDiffFiles(buf, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
- call VerifyBoth(buf, 'Test_diff_02', '')
-
- " Test 3: Add a line at the end of file 2
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
- call VerifyBoth(buf, 'Test_diff_03', '')
-
- " Test 4: Add a line at the end of file 1
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
- call VerifyBoth(buf, 'Test_diff_04', '')
-
- " Test 5: Add a line in the middle of file 2, remove on at the end of file 1
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10])
- call VerifyBoth(buf, 'Test_diff_05', '')
-
- " Test 6: Add a line in the middle of file 1, remove on at the end of file 2
- call WriteDiffFiles(buf, [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
- call VerifyBoth(buf, 'Test_diff_06', '')
-
- " Variants on test 6 with different context settings
- call term_sendkeys(buf, ":set diffopt+=context:2\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_06.2', {})
- call term_sendkeys(buf, ":set diffopt-=context:2\<cr>")
- call term_sendkeys(buf, ":set diffopt+=context:1\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_06.1', {})
- call term_sendkeys(buf, ":set diffopt-=context:1\<cr>")
- call term_sendkeys(buf, ":set diffopt+=context:0\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_06.0', {})
- call term_sendkeys(buf, ":set diffopt-=context:0\<cr>")
-
- " Test 7 - 9: Test normal/patience/histogram diff algorithm
- call WriteDiffFiles(buf, ['#include <stdio.h>', '', '// Frobs foo heartily', 'int frobnitz(int foo)', '{',
- \ ' int i;', ' for(i = 0; i < 10; i++)', ' {', ' printf("Your answer is: ");',
- \ ' printf("%d\n", foo);', ' }', '}', '', 'int fact(int n)', '{', ' if(n > 1)', ' {',
- \ ' return fact(n-1) * n;', ' }', ' return 1;', '}', '', 'int main(int argc, char **argv)',
- \ '{', ' frobnitz(fact(10));', '}'],
- \ ['#include <stdio.h>', '', 'int fib(int n)', '{', ' if(n > 2)', ' {',
- \ ' return fib(n-1) + fib(n-2);', ' }', ' return 1;', '}', '', '// Frobs foo heartily',
- \ 'int frobnitz(int foo)', '{', ' int i;', ' for(i = 0; i < 10; i++)', ' {',
- \ ' printf("%d\n", foo);', ' }', '}', '',
- \ 'int main(int argc, char **argv)', '{', ' frobnitz(fib(10));', '}'])
- call term_sendkeys(buf, ":diffupdate!\<cr>")
- call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_07', {})
-
- call term_sendkeys(buf, ":set diffopt+=algorithm:patience\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_08', {})
-
- call term_sendkeys(buf, ":set diffopt+=algorithm:histogram\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_09', {})
-
- " Test 10-11: normal/indent-heuristic
- call term_sendkeys(buf, ":set diffopt&vim\<cr>")
- call WriteDiffFiles(buf, ['', ' def finalize(values)', '', ' values.each do |v|', ' v.finalize', ' end'],
- \ ['', ' def finalize(values)', '', ' values.each do |v|', ' v.prepare', ' end', '',
- \ ' values.each do |v|', ' v.finalize', ' end'])
- call term_sendkeys(buf, ":diffupdate!\<cr>")
- call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_10', {})
-
- " Leave trailing : at commandline!
- call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>:\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_11', {}, 'one')
- " shouldn't matter, if indent-algorithm comes before or after the algorithm
- call term_sendkeys(buf, ":set diffopt&\<cr>")
- call term_sendkeys(buf, ":set diffopt+=indent-heuristic,algorithm:patience\<cr>:\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_11', {}, 'two')
- call term_sendkeys(buf, ":set diffopt&\<cr>")
- call term_sendkeys(buf, ":set diffopt+=algorithm:patience,indent-heuristic\<cr>:\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_11', {}, 'three')
-
- " Test 12: diff the same file
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
- call VerifyBoth(buf, 'Test_diff_12', '')
-
- " Test 13: diff an empty file
- call WriteDiffFiles(buf, [], [])
- call VerifyBoth(buf, 'Test_diff_13', '')
-
- " Test 14: test diffopt+=icase
- call WriteDiffFiles(buf, ['a', 'b', 'cd'], ['A', 'b', 'cDe'])
- call VerifyBoth(buf, 'Test_diff_14', " diffopt+=filler diffopt+=icase")
-
- " Test 15-16: test diffopt+=iwhite
- call WriteDiffFiles(buf, ['int main()', '{', ' printf("Hello, World!");', ' return 0;', '}'],
- \ ['int main()', '{', ' if (0)', ' {', ' printf("Hello, World!");', ' return 0;', ' }', '}'])
- call term_sendkeys(buf, ":diffupdate!\<cr>")
- call term_sendkeys(buf, ":set diffopt&vim diffopt+=filler diffopt+=iwhite\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_15', {})
- call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_16', {})
-
- " Test 17: test diffopt+=iblank
- call WriteDiffFiles(buf, ['a', ' ', 'cd', 'ef', 'xxx'], ['a', 'cd', '', 'ef', 'yyy'])
- call VerifyInternal(buf, 'Test_diff_17', " diffopt+=iblank")
-
- " Test 18: test diffopt+=iblank,iwhite / iwhiteall / iwhiteeol
- call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhite")
- call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhiteall")
- call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhiteeol")
-
- " Test 19: test diffopt+=iwhiteeol
- call WriteDiffFiles(buf, ['a ', 'x', 'cd', 'ef', 'xx xx', 'foo', 'bar'], ['a', 'x', 'c d', ' ef', 'xx xx', 'foo', '', 'bar'])
- call VerifyInternal(buf, 'Test_diff_19', " diffopt+=iwhiteeol")
-
- " Test 19: test diffopt+=iwhiteall
- call VerifyInternal(buf, 'Test_diff_20', " diffopt+=iwhiteall")
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('Xfile1')
- call delete('Xfile2')
-endfunc
-
-func Test_diff_with_cursorline()
- CheckScreendump
-
- call writefile([
- \ 'hi CursorLine ctermbg=red ctermfg=white',
- \ 'set cursorline',
- \ 'call setline(1, ["foo","foo","foo","bar"])',
- \ 'vnew',
- \ 'call setline(1, ["bee","foo","foo","baz"])',
- \ 'windo diffthis',
- \ '2wincmd w',
- \ ], 'Xtest_diff_cursorline')
- let buf = RunVimInTerminal('-S Xtest_diff_cursorline', {})
-
- call VerifyScreenDump(buf, 'Test_diff_with_cursorline_01', {})
- call term_sendkeys(buf, "j")
- call VerifyScreenDump(buf, 'Test_diff_with_cursorline_02', {})
- call term_sendkeys(buf, "j")
- call VerifyScreenDump(buf, 'Test_diff_with_cursorline_03', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('Xtest_diff_cursorline')
-endfunc
-
func Test_diff_with_syntax()
CheckScreendump
@@ -942,30 +785,6 @@ func Test_diff_with_syntax()
call delete('Xprogram2.c')
endfunc
-func Test_diff_of_diff()
- CheckScreendump
- CheckFeature rightleft
-
- call writefile([
- \ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])',
- \ 'vnew',
- \ 'call setline(1, ["aa","bb","cc"])',
- \ 'windo diffthis',
- \ '1wincmd w',
- \ 'setlocal number',
- \ ], 'Xtest_diff_diff')
- let buf = RunVimInTerminal('-S Xtest_diff_diff', {})
-
- call VerifyScreenDump(buf, 'Test_diff_of_diff_01', {})
-
- call term_sendkeys(buf, ":set rightleft\<cr>")
- call VerifyScreenDump(buf, 'Test_diff_of_diff_02', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('Xtest_diff_diff')
-endfunc
-
func CloseoffSetup()
enew
call setline(1, ['one', 'two', 'three'])
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 31357e7..15cd11a 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -538,15 +538,6 @@ func CheckItems(checks)
endfor
endfunc
-func Test_filetype_detection()
- filetype on
- call CheckItems(s:filename_checks)
- if has('fname_case')
- call CheckItems(s:filename_case_checks)
- endif
- filetype off
-endfunc
-
" Filetypes detected from the file contents by scripts.vim
let s:script_checks = {
\ 'virata': [['% Virata'],
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index d5ee716..43e6028 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -519,122 +519,6 @@ func Test_popup_noscrolloff()
call popup_close(winid)
endfunc
-func Test_popup_drag()
- CheckScreendump
-
- " create a popup that covers the command line
- let lines =<< trim END
- call setline(1, range(1, 20))
- split
- vsplit
- $wincmd w
- vsplit
- 1wincmd w
- let winid = popup_create(['1111', '222222', '33333'], #{
- \ drag: 1,
- \ resize: 1,
- \ border: [],
- \ line: &lines - 4,
- \ })
- func Dragit()
- call feedkeys("\<F3>\<LeftMouse>\<F4>\<LeftDrag>\<LeftRelease>", "xt")
- endfunc
- map <silent> <F3> :call test_setmouse(&lines - 4, &columns / 2)<CR>
- map <silent> <F4> :call test_setmouse(&lines - 8, &columns / 2 - 20)<CR>
- func Resize()
- call feedkeys("\<F5>\<LeftMouse>\<F6>\<LeftDrag>\<LeftRelease>", "xt")
- endfunc
- map <silent> <F5> :call test_setmouse(6, 21)<CR>
- map <silent> <F6> :call test_setmouse(7, 25)<CR>
- END
- call writefile(lines, 'XtestPopupDrag')
- let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10})
- call VerifyScreenDump(buf, 'Test_popupwin_drag_01', {})
-
- call term_sendkeys(buf, ":call Dragit()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_drag_02', {})
-
- call term_sendkeys(buf, ":call Resize()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_drag_03', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestPopupDrag')
-endfunc
-
-func Test_popup_close_with_mouse()
- CheckScreendump
-
- let lines =<< trim END
- call setline(1, range(1, 20))
- " With border, can click on X
- let winid = popup_create('foobar', #{
- \ close: 'button',
- \ border: [],
- \ line: 1,
- \ col: 1,
- \ })
- func CloseMsg(id, result)
- echomsg 'Popup closed with ' .. a:result
- endfunc
- let winid = popup_create('notification', #{
- \ close: 'click',
- \ line: 3,
- \ col: 15,
- \ callback: 'CloseMsg',
- \ })
- let winid = popup_create('no border here', #{
- \ close: 'button',
- \ line: 5,
- \ col: 3,
- \ })
- let winid = popup_create('only padding', #{
- \ close: 'button',
- \ padding: [],
- \ line: 5,
- \ col: 23,
- \ })
- func CloseWithX()
- call feedkeys("\<F3>\<LeftMouse>\<LeftRelease>", "xt")
- endfunc
- map <silent> <F3> :call test_setmouse(1, len('foobar') + 2)<CR>
- func CloseWithClick()
- call feedkeys("\<F4>\<LeftMouse>\<LeftRelease>", "xt")
- endfunc
- map <silent> <F4> :call test_setmouse(3, 17)<CR>
- func CreateWithMenuFilter()
- let winid = popup_create('barfoo', #{
- \ close: 'button',
- \ filter: 'popup_filter_menu',
- \ border: [],
- \ line: 1,
- \ col: 40,
- \ })
- endfunc
- END
- call writefile(lines, 'XtestPopupClose')
- let buf = RunVimInTerminal('-S XtestPopupClose', #{rows: 10})
- call VerifyScreenDump(buf, 'Test_popupwin_close_01', {})
-
- call term_sendkeys(buf, ":call CloseWithX()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_close_02', {})
-
- call term_sendkeys(buf, ":call CloseWithClick()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_close_03', {})
-
- call term_sendkeys(buf, ":call CreateWithMenuFilter()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_close_04', {})
-
- " We have to send the actual mouse code, feedkeys() would be caught the
- " filter.
- call term_sendkeys(buf, "\<Esc>[<0;47;1M")
- call VerifyScreenDump(buf, 'Test_popupwin_close_05', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestPopupClose')
-endfunction
-
func Test_popup_menu_wrap()
CheckScreendump
@@ -1335,52 +1219,6 @@ func Test_popup_atcursor_pos()
call delete('XtestPopupAtcursorPos')
endfunc
-func Test_popup_beval()
- CheckScreendump
- CheckFeature balloon_eval_term
-
- let lines =<< trim END
- call setline(1, range(1, 20))
- call setline(5, 'here is some text to hover over')
- set balloonevalterm
- set balloonexpr=BalloonExpr()
- set balloondelay=100
- func BalloonExpr()
- let s:winid = [v:beval_text]->popup_beval({})
- return ''
- endfunc
- func Hover()
- call test_setmouse(5, 15)
- call feedkeys("\<MouseMove>\<Ignore>", "xt")
- sleep 100m
- endfunc
- func MoveOntoPopup()
- call test_setmouse(4, 17)
- call feedkeys("\<F4>\<MouseMove>\<Ignore>", "xt")
- endfunc
- func MoveAway()
- call test_setmouse(5, 13)
- call feedkeys("\<F5>\<MouseMove>\<Ignore>", "xt")
- endfunc
- END
- call writefile(lines, 'XtestPopupBeval')
- let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10})
- call term_wait(buf, 100)
- call term_sendkeys(buf, 'j')
- call term_sendkeys(buf, ":call Hover()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_beval_1', {})
-
- call term_sendkeys(buf, ":call MoveOntoPopup()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_beval_2', {})
-
- call term_sendkeys(buf, ":call MoveAway()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_beval_3', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestPopupBeval')
-endfunc
-
func Test_popup_filter()
new
call setline(1, 'some text')
@@ -1895,129 +1733,6 @@ func Test_notifications()
call delete('XtestNotifications')
endfunc
-func Test_popup_scrollbar()
- CheckScreendump
-
- let lines =<< trim END
- call setline(1, range(1, 20))
- hi ScrollThumb ctermbg=blue
- hi ScrollBar ctermbg=red
- let winid = popup_create(['one', 'two', 'three', 'four', 'five',
- \ 'six', 'seven', 'eight', 'nine'], #{
- \ minwidth: 8,
- \ maxheight: 4,
- \ })
- func ScrollUp()
- call feedkeys("\<F3>\<ScrollWheelUp>", "xt")
- endfunc
- func ScrollDown()
- call feedkeys("\<F3>\<ScrollWheelDown>", "xt")
- endfunc
- func ClickTop()
- call feedkeys("\<F4>\<LeftMouse>", "xt")
- endfunc
- func ClickBot()
- call popup_setoptions(g:winid, #{border: [], close: 'button'})
- call feedkeys("\<F5>\<LeftMouse>", "xt")
- endfunc
- func Popup_filter(winid, key)
- if a:key == 'j'
- let line = popup_getoptions(a:winid).firstline
- let nlines = line('$', a:winid)
- let newline = line < nlines ? (line + 1) : nlines
- call popup_setoptions(a:winid, #{firstline: newline})
- return v:true
- elseif a:key == 'x'
- call popup_close(a:winid)
- return v:true
- endif
- endfunc
-
- func PopupScroll()
- call popup_clear()
- let text =<< trim END
- 1
- 2
- 3
- 4
- long line long line long line long line long line long line
- long line long line long line long line long line long line
- long line long line long line long line long line long line
- END
- call popup_create(text, #{
- \ minwidth: 30,
- \ maxwidth: 30,
- \ minheight: 4,
- \ maxheight: 4,
- \ firstline: 1,
- \ lastline: 4,
- \ wrap: v:true,
- \ scrollbar: v:true,
- \ mapping: v:false,
- \ filter: funcref('Popup_filter')
- \ })
- endfunc
- map <silent> <F3> :call test_setmouse(5, 36)<CR>
- map <silent> <F4> :call test_setmouse(4, 42)<CR>
- map <silent> <F5> :call test_setmouse(7, 42)<CR>
- END
- call writefile(lines, 'XtestPopupScroll')
- let buf = RunVimInTerminal('-S XtestPopupScroll', #{rows: 10})
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_1', {})
-
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{firstline: 2})\<CR>")
- call term_sendkeys(buf, ":\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_2', {})
-
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{firstline: 6})\<CR>")
- call term_sendkeys(buf, ":\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_3', {})
-
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{firstline: 9})\<CR>")
- call term_sendkeys(buf, ":\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_4', {})
-
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{scrollbarhighlight: 'ScrollBar', thumbhighlight: 'ScrollThumb', firstline: 5})\<CR>")
- " this scrolls two lines (half the window height)
- call term_sendkeys(buf, ":call ScrollUp()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_5', {})
-
- call term_sendkeys(buf, ":call ScrollDown()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_6', {})
-
- call term_sendkeys(buf, ":call ScrollDown()\<CR>")
- " wait a bit, otherwise it fails sometimes (double click recognized?)
- sleep 100m
- call term_sendkeys(buf, ":call ScrollDown()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_7', {})
-
- call term_sendkeys(buf, ":call ClickTop()\<CR>")
- sleep 100m
- call term_sendkeys(buf, ":call ClickTop()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_8', {})
-
- call term_sendkeys(buf, ":call ClickBot()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_9', {})
-
- " remove the minwidth and maxheight
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{maxheight: 0, minwidth: 0})\<CR>")
- call term_sendkeys(buf, ":\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_10', {})
-
- " check size with non-wrapping lines
- call term_sendkeys(buf, ":call PopupScroll()\<CR>")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_11', {})
-
- " check size with wrapping lines
- call term_sendkeys(buf, "j")
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_12', {})
- call term_sendkeys(buf, "x")
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestPopupScroll')
-endfunc
-
func Test_popup_fitting_scrollbar()
" this was causing a crash, divide by zero
let winid = popup_create([
diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim
index 1b339d4..a42129d 100644
--- a/src/testdir/test_popupwin_textprop.vim
+++ b/src/testdir/test_popupwin_textprop.vim
@@ -7,170 +7,4 @@ CheckFeature textprop
source screendump.vim
CheckScreendump
-func Test_textprop_popup()
- let lines =<< trim END
- call setline(1, range(1, 100))
- call setline(50, 'some text to work with')
- 50
- normal zz
- set scrolloff=0
- call prop_type_add('popupMarker', #{highlight: 'DiffAdd', bufnr: bufnr('%')})
- call prop_add(50, 11, #{
- \ length: 7,
- \ type: 'popupMarker',
- \ bufnr: bufnr('%'),
- \ })
- let winid = popup_create('the text', #{
- \ pos: 'botleft',
- \ textprop: 'popupMarker',
- \ border: [],
- \ padding: [0,1,0,1],
- \ close: 'click',
- \ })
- END
- call writefile(lines, 'XtestTextpropPopup')
- let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10})
- call VerifyScreenDump(buf, 'Test_popup_textprop_01', {})
-
- call term_sendkeys(buf, "zt")
- call VerifyScreenDump(buf, 'Test_popup_textprop_02', {})
-
- call term_sendkeys(buf, "zzIawe\<Esc>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_03', {})
-
- call term_sendkeys(buf, "0dw")
- call VerifyScreenDump(buf, 'Test_popup_textprop_04', {})
-
- call term_sendkeys(buf, "Oinserted\<Esc>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_05', {})
-
- call term_sendkeys(buf, "k2dd")
- call VerifyScreenDump(buf, 'Test_popup_textprop_06', {})
-
- call term_sendkeys(buf, "4\<C-E>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_07', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestTextpropPopup')
-endfunc
-
-func Test_textprop_popup_corners()
- let lines =<< trim END
- call setline(1, range(1, 100))
- call setline(50, 'now working with some longer text here')
- 50
- normal zz
- set scrolloff=0
- call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
- call prop_add(50, 23, #{
- \ length: 6,
- \ type: 'popupMarker',
- \ })
- let winid = popup_create('bottom left', #{
- \ pos: 'botleft',
- \ textprop: 'popupMarker',
- \ textpropwin: win_getid(),
- \ padding: [0,1,0,1],
- \ })
- let winid = popup_create('bottom right', #{
- \ pos: 'botright',
- \ textprop: 'popupMarker',
- \ border: [],
- \ padding: [0,1,0,1],
- \ })
- let winid = popup_create('top left', #{
- \ pos: 'topleft',
- \ textprop: 'popupMarker',
- \ border: [],
- \ padding: [0,1,0,1],
- \ })
- let winid = popup_create('top right', #{
- \ pos: 'topright',
- \ textprop: 'popupMarker',
- \ padding: [0,1,0,1],
- \ })
- END
- call writefile(lines, 'XtestTextpropPopupCorners')
- let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12})
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {})
-
- call term_sendkeys(buf, "0dw")
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_2', {})
-
- call term_sendkeys(buf, "46Goextra\<Esc>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_3', {})
-
- call term_sendkeys(buf, "u")
- call term_sendkeys(buf, ":\<CR>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_4', {})
-
- call term_sendkeys(buf, ":vsplit foo\<CR>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_5', {})
-
- call term_sendkeys(buf, ":only!\<CR>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_6', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestTextpropPopupCorners')
-endfunc
-
-func Test_textprop_popup_offsets()
- let lines =<< trim END
- call setline(1, range(1, 100))
- call setline(50, 'now working with some longer text here')
- 50
- normal zz
- set scrolloff=0
- call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
- call prop_add(50, 23, #{
- \ length: 6,
- \ type: 'popupMarker',
- \ })
- let winid = popup_create('bottom left', #{
- \ pos: 'botleft',
- \ line: -1,
- \ col: 2,
- \ textprop: 'popupMarker',
- \ padding: [0,1,0,1],
- \ })
- let winid = popup_create('bottom right', #{
- \ pos: 'botright',
- \ line: -1,
- \ col: -2,
- \ textprop: 'popupMarker',
- \ border: [],
- \ padding: [0,1,0,1],
- \ })
- let winid = popup_create('top left', #{
- \ pos: 'topleft',
- \ line: 1,
- \ col: 2,
- \ textprop: 'popupMarker',
- \ border: [],
- \ padding: [0,1,0,1],
- \ })
- let winid = popup_create('top right', #{
- \ pos: 'topright',
- \ line: 1,
- \ col: -2,
- \ textprop: 'popupMarker',
- \ padding: [0,1,0,1],
- \ })
- END
- call writefile(lines, 'XtestTextpropPopupOffset')
- let buf = RunVimInTerminal('-S XtestTextpropPopupOffset', #{rows: 12})
- call VerifyScreenDump(buf, 'Test_popup_textprop_off_1', {})
-
- " test that removing the text property closes the popups
- call term_sendkeys(buf, ":call prop_clear(50)\<CR>")
- call VerifyScreenDump(buf, 'Test_popup_textprop_off_2', {})
-
- " clean up
- call StopVimInTerminal(buf)
- call delete('XtestTextpropPopupOffset')
-endfunc
-
-
" vim: shiftwidth=2 sts=2
--
2.19.1