aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/assert_spec.lua
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2015-12-30 19:14:33 +0900
committerwatiko <service@mail.watiko.net>2016-01-10 10:44:57 +0900
commit59b04d856b869204eec3ebc73a99b055734679b8 (patch)
tree38ceeb0bfb491d2ca1067c0b678252efdcfb3657 /test/functional/legacy/assert_spec.lua
parentfeed81f45f1c9fa52e54f4a6168391dac6200066 (diff)
downloadrneovim-59b04d856b869204eec3ebc73a99b055734679b8.tar.gz
rneovim-59b04d856b869204eec3ebc73a99b055734679b8.tar.bz2
rneovim-59b04d856b869204eec3ebc73a99b055734679b8.zip
tests: Make helper.source() return tempname.
Diffstat (limited to 'test/functional/legacy/assert_spec.lua')
-rw-r--r--test/functional/legacy/assert_spec.lua16
1 files changed, 1 insertions, 15 deletions
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua
index 20d78db363..1ce665360d 100644
--- a/test/functional/legacy/assert_spec.lua
+++ b/test/functional/legacy/assert_spec.lua
@@ -1,8 +1,7 @@
-local ffi = require('ffi')
local helpers = require('test.functional.helpers')
local nvim, call = helpers.meths, helpers.call
local clear, eq = helpers.clear, helpers.eq
-local write_file, execute = helpers.write_file, helpers.execute
+local source, execute = helpers.source, helpers.execute
local function expected_errors(errors)
eq(errors, nvim.get_vvar('errors'))
@@ -12,19 +11,6 @@ local function expected_empty()
eq({}, nvim.get_vvar('errors'))
end
-local function source(code)
- local tmpname = os.tmpname()
-
- if ffi.os == 'OSX' and string.match(tmpname, '^/tmp') then
- tmpname = '/private'..tmpname
- end
-
- write_file(tmpname, code)
- nvim.command('source '..tmpname)
- os.remove(tmpname)
- return tmpname
-end
-
describe('assert function:', function()
before_each(function()