diff options
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 50fa3fb1bd..1fba15c2c3 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -1,4 +1,5 @@ require('coxpcall') +local ffi = require('ffi') local lfs = require('lfs') local assert = require('luassert') local Loop = require('nvim.loop') @@ -246,9 +247,13 @@ 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 local function eq(expected, actual) |