From 9ce81f7b2b90846063f6bd4a5ce8efc61e437983 Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Tue, 29 Dec 2015 19:18:16 +0000 Subject: functionaltest: Create lua helper for os.tmpname() In Windows Lua's os.tmpname() returns relative paths starting with \s, prepend them with $TEMP to generate a valid path. In OS X os.tmpname() returns paths in '/tmp' but they should be in '/private/tmp'. We cannot use os_name() for platform detection because some tests use tempname() before nvim is spawned, instead use one of the following: 1. Set SYSTEM_NAME environment variable before calling the tests, it is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows') 2. Call uname -s 3. Assume windows --- test/functional/shada/helpers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/shada/helpers.lua') diff --git a/test/functional/shada/helpers.lua b/test/functional/shada/helpers.lua index bb2919d4fb..cde555f0a7 100644 --- a/test/functional/shada/helpers.lua +++ b/test/functional/shada/helpers.lua @@ -5,7 +5,7 @@ local write_file, merge_args = helpers.write_file, helpers.merge_args local mpack = require('mpack') -local tmpname = os.tmpname() +local tmpname = helpers.tmpname() local additional_cmd = '' local function nvim_argv() -- cgit