mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 9.1.0872: No test for W23 message
Problem: No test for W23 message Solution: Check for W23 message when accessing the clipboard fails (after v9.1.0868) closes: #16076 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
a73dfc2f55
commit
a15dfc2d41
@ -1045,7 +1045,7 @@ func Test_insert_small_delete_replace_mode()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for W23 when clipboard is not available
|
" Test for W24 when clipboard support is not available
|
||||||
func Test_clipboard_regs_not_working()
|
func Test_clipboard_regs_not_working()
|
||||||
CheckNotGui
|
CheckNotGui
|
||||||
if !has("clipboard")
|
if !has("clipboard")
|
||||||
@ -1057,4 +1057,29 @@ func Test_clipboard_regs_not_working()
|
|||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Check for W23 with a Vim with clipboard support,
|
||||||
|
" but when the connection to the X11 server does not work
|
||||||
|
func Test_clipboard_regs_not_working2()
|
||||||
|
CheckNotMac
|
||||||
|
CheckRunVimInTerminal
|
||||||
|
CheckFeature clipboard
|
||||||
|
let display=$DISPLAY
|
||||||
|
unlet $DISPLAY
|
||||||
|
" Run in a separate Vim instance because changing 'encoding' may cause
|
||||||
|
" trouble for later tests.
|
||||||
|
let lines =<< trim END
|
||||||
|
unlet $DISPLAY
|
||||||
|
call setline(1, 'abcdefg')
|
||||||
|
let a=execute(':norm! "+yy')
|
||||||
|
call writefile([a], 'Xclipboard_result.txt')
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XTest_clipboard', 'D')
|
||||||
|
let buf = RunVimInTerminal('-S XTest_clipboard', {})
|
||||||
|
call term_sendkeys(buf, "\"+yy")
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
let result = readfile('Xclipboard_result.txt')
|
||||||
|
call assert_match("^\\nW23:", result[0])
|
||||||
|
let $DISPLAY=display
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
872,
|
||||||
/**/
|
/**/
|
||||||
871,
|
871,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user