aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/eval_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-06-11 12:58:57 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-06-11 12:58:57 -0400
commite7ab3e7e591c739688bef99e3855b3ef232cdb66 (patch)
tree67f74adcb34da232065d0c64e8e2df329ca24605 /test/functional/legacy/eval_spec.lua
parent871fc6c1e17bc1fc1b3a937ff481aca1f0aeff43 (diff)
downloadrneovim-e7ab3e7e591c739688bef99e3855b3ef232cdb66.tar.gz
rneovim-e7ab3e7e591c739688bef99e3855b3ef232cdb66.tar.bz2
rneovim-e7ab3e7e591c739688bef99e3855b3ef232cdb66.zip
test: Use clipboard fixture instead of user's clipboard (#4903)
Diffstat (limited to 'test/functional/legacy/eval_spec.lua')
-rw-r--r--test/functional/legacy/eval_spec.lua18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/functional/legacy/eval_spec.lua b/test/functional/legacy/eval_spec.lua
index b7317045be..3684fe714d 100644
--- a/test/functional/legacy/eval_spec.lua
+++ b/test/functional/legacy/eval_spec.lua
@@ -5,11 +5,6 @@ local feed, insert, source = helpers.feed, helpers.insert, helpers.source
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
local eq, eval, write_file = helpers.eq, helpers.eval, helpers.write_file
-local function has_clipboard()
- clear()
- return 1 == eval("has('clipboard')")
-end
-
describe('eval', function()
setup(function()
write_file('test_eval_setup.vim', [[
@@ -539,8 +534,13 @@ describe('eval', function()
=: type v; value: abc/]].."\000 (['abc/\000"..[[']), expr: "abc/]]..'\000'..[[" (['"abc/]]..'\000'..[["'])]])
end)
- if has_clipboard() then
- it('system clipboard', function()
+ describe('system clipboard', function()
+ before_each(function()
+ execute('let &runtimepath = "test/functional/fixtures,".&runtimepath')
+ execute('call getreg("*")') -- force load of provider
+ end)
+
+ it('works', function()
insert([[
Some first line (this text was at the top of the old test_eval.in).
@@ -570,9 +570,7 @@ describe('eval', function()
*: type V; value: clipboard contents]]..'\00'..[[ (['clipboard contents']), expr: clipboard contents]]..'\00'..[[ (['clipboard contents'])
*: type V; value: something else]]..'\00'..[[ (['something else']), expr: something else]]..'\00'..[[ (['something else'])]])
end)
- else
- pending('system clipboard not available', function() end)
- end
+ end)
it('errors', function()
source([[