diff options
author | watiko <service@mail.watiko.net> | 2015-12-30 19:14:33 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2016-01-10 10:44:57 +0900 |
commit | 59b04d856b869204eec3ebc73a99b055734679b8 (patch) | |
tree | 38ceeb0bfb491d2ca1067c0b678252efdcfb3657 /test/functional/legacy/assert_spec.lua | |
parent | feed81f45f1c9fa52e54f4a6168391dac6200066 (diff) | |
download | rneovim-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.lua | 16 |
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() |