aboutsummaryrefslogtreecommitdiff
path: root/test/functional/fixtures
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-07-20 20:24:28 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-07-20 20:24:28 -0400
commitbd753bdacce6e4e935ac7e93f29bf30223131e5e (patch)
treea004170cd442f19404965cd2d06966cd4fe12930 /test/functional/fixtures
parent0e39b2c93637af3e79bc29b97cffde5b9cd7cd2e (diff)
parent8047570b708c27b68e9a3a50c11de932c3eeab41 (diff)
downloadrneovim-bd753bdacce6e4e935ac7e93f29bf30223131e5e.tar.gz
rneovim-bd753bdacce6e4e935ac7e93f29bf30223131e5e.tar.bz2
rneovim-bd753bdacce6e4e935ac7e93f29bf30223131e5e.zip
Merge #3014 'clipboard: handle middle-click paste correctly.'.
Diffstat (limited to 'test/functional/fixtures')
-rw-r--r--test/functional/fixtures/autoload/provider/clipboard.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/fixtures/autoload/provider/clipboard.vim b/test/functional/fixtures/autoload/provider/clipboard.vim
new file mode 100644
index 0000000000..a28484169a
--- /dev/null
+++ b/test/functional/fixtures/autoload/provider/clipboard.vim
@@ -0,0 +1,28 @@
+let g:test_clip = { '+': [''], '*': [''], }
+
+let s:methods = {}
+
+let g:cliplossy = 0
+let g:cliperror = 0
+
+function! s:methods.get(reg)
+ if g:cliperror
+ return 0
+ end
+ if g:cliplossy
+ " behave like pure text clipboard
+ return g:test_clip[a:reg][0]
+ else
+ "behave like VIMENC clipboard
+ return g:test_clip[a:reg]
+ end
+endfunction
+
+function! s:methods.set(lines, regtype, reg)
+ let g:test_clip[a:reg] = [a:lines, a:regtype]
+endfunction
+
+
+function! provider#clipboard#Call(method, args)
+ return call(s:methods[a:method],a:args,s:methods)
+endfunction