diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-03-13 15:43:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-03-13 15:43:46 +0100 |
commit | a903472cfa048e7a29d9c6ed0945ef03e48c6a08 (patch) | |
tree | 86750b67c2f752e72c9cd852c2f3dd5aa53f368d /src/testdir/shared.vim | |
parent | f118d4847eb0dc2473260aebce301643568c5bc3 (diff) |
patch 8.0.1604: paste test may fail if $DISPLAY is not setv8.0.1604
Problem: Paste test may fail if $DISPLAY is not set.
Solution: Add WorkingClipboard() and use it in the paste test.
Diffstat (limited to 'src/testdir/shared.vim')
-rw-r--r-- | src/testdir/shared.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index 877c5f9d70..d47a355383 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -260,6 +260,16 @@ func CanRunGui() return has('gui') && ($DISPLAY != "" || has('gui_running')) endfunc +func WorkingClipboard() + if !has('clipboard') + return 0 + endif + if has('x11') + return $DISPLAY != "" + endif + return 1 +endfunc + " Get line "lnum" as displayed on the screen. " Trailing white space is trimmed. func! Screenline(lnum) |