Mercurial > vim
comparison src/testdir/test_paste.vim @ 13460:aa6ecb272236 v8.0.1604
patch 8.0.1604: paste test may fail if $DISPLAY is not set
commit https://github.com/vim/vim/commit/a903472cfa048e7a29d9c6ed0945ef03e48c6a08
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 13 15:43:46 2018 +0100
patch 8.0.1604: paste test may fail if $DISPLAY is not set
Problem: Paste test may fail if $DISPLAY is not set.
Solution: Add WorkingClipboard() and use it in the paste test.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Mar 2018 15:45:07 +0100 |
parents | bb789ed5113a |
children | fa133cd14f87 |
comparison
equal
deleted
inserted
replaced
13459:4879a00cec7f | 13460:aa6ecb272236 |
---|---|
3 " Bracketed paste only works with "xterm". Not in GUI. | 3 " Bracketed paste only works with "xterm". Not in GUI. |
4 if has('gui_running') | 4 if has('gui_running') |
5 finish | 5 finish |
6 endif | 6 endif |
7 set term=xterm | 7 set term=xterm |
8 | |
9 source shared.vim | |
8 | 10 |
9 func Test_paste_normal_mode() | 11 func Test_paste_normal_mode() |
10 new | 12 new |
11 " In first column text is inserted | 13 " In first column text is inserted |
12 call setline(1, ['a', 'b', 'c']) | 14 call setline(1, ['a', 'b', 'c']) |
65 set ai& et& tw=0 | 67 set ai& et& tw=0 |
66 bwipe! | 68 bwipe! |
67 endfunc | 69 endfunc |
68 | 70 |
69 func Test_paste_clipboard() | 71 func Test_paste_clipboard() |
70 if !has('clipboard') | 72 if !WorkingClipboard() |
71 return | 73 return |
72 endif | 74 endif |
73 let @+ = "nasty\<Esc>:!ls\<CR>command" | 75 let @+ = "nasty\<Esc>:!ls\<CR>command" |
74 new | 76 new |
75 exe "normal i\<C-R>+\<Esc>" | 77 exe "normal i\<C-R>+\<Esc>" |