diff options
Diffstat (limited to 'test/functional/legacy')
-rw-r--r-- | test/functional/legacy/036_regexp_character_classes_spec.lua | 12 | ||||
-rw-r--r-- | test/functional/legacy/file_perm_spec.lua | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/test/functional/legacy/036_regexp_character_classes_spec.lua b/test/functional/legacy/036_regexp_character_classes_spec.lua index 9e67bb9429..15287b9901 100644 --- a/test/functional/legacy/036_regexp_character_classes_spec.lua +++ b/test/functional/legacy/036_regexp_character_classes_spec.lua @@ -3,7 +3,6 @@ local helpers = require('test.functional.helpers')(after_each) local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect local source, write_file = helpers.source, helpers.write_file -local os_name = helpers.os_name local function sixlines(text) local result = '' @@ -14,19 +13,16 @@ local function sixlines(text) end local function diff(text, nodedent) - local tmpname = os.tmpname() - if os_name() == 'osx' and string.match(tmpname, '^/tmp') then - tmpname = '/private'..tmpname - end - execute('w! '..tmpname) + local fname = helpers.tmpname() + execute('w! '..fname) helpers.wait() - local data = io.open(tmpname):read('*all') + local data = io.open(fname):read('*all') if nodedent then helpers.eq(text, data) else helpers.eq(helpers.dedent(text), data) end - os.remove(tmpname) + os.remove(fname) end describe('character classes in regexp', function() diff --git a/test/functional/legacy/file_perm_spec.lua b/test/functional/legacy/file_perm_spec.lua index 9ebbfd25e4..77e82352c5 100644 --- a/test/functional/legacy/file_perm_spec.lua +++ b/test/functional/legacy/file_perm_spec.lua @@ -6,7 +6,7 @@ local clear, call, eq = helpers.clear, helpers.call, helpers.eq local neq, exc_exec = helpers.neq, helpers.exc_exec describe('Test getting and setting file permissions', function() - local tempfile = os.tmpname() + local tempfile = helpers.tmpname() before_each(function() os.remove(tempfile) |