aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/036_regexp_character_classes_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/legacy/036_regexp_character_classes_spec.lua')
-rw-r--r--test/functional/legacy/036_regexp_character_classes_spec.lua12
1 files changed, 4 insertions, 8 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()