From feed81f45f1c9fa52e54f4a6168391dac6200066 Mon Sep 17 00:00:00 2001 From: watiko Date: Sat, 19 Dec 2015 10:25:19 +0900 Subject: [PATCH] tests: Fix OSX's tempname issue. --- test/functional/legacy/assert_spec.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua index 5d91aa9099..20d78db363 100644 --- a/test/functional/legacy/assert_spec.lua +++ b/test/functional/legacy/assert_spec.lua @@ -1,3 +1,4 @@ +local ffi = require('ffi') local helpers = require('test.functional.helpers') local nvim, call = helpers.meths, helpers.call local clear, eq = helpers.clear, helpers.eq @@ -13,6 +14,11 @@ 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)