aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/editorconfig_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/plugin/editorconfig_spec.lua')
-rw-r--r--test/functional/plugin/editorconfig_spec.lua30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/functional/plugin/editorconfig_spec.lua b/test/functional/plugin/editorconfig_spec.lua
index c8151d2005..cd524373da 100644
--- a/test/functional/plugin/editorconfig_spec.lua
+++ b/test/functional/plugin/editorconfig_spec.lua
@@ -1,11 +1,11 @@
-local helpers = require('test.functional.helpers')(after_each)
-local clear = helpers.clear
-local command = helpers.command
-local eq = helpers.eq
-local pathsep = helpers.get_pathsep()
-local fn = helpers.fn
-local api = helpers.api
-local exec_lua = helpers.exec_lua
+local t = require('test.functional.testutil')(after_each)
+local clear = t.clear
+local command = t.command
+local eq = t.eq
+local pathsep = t.get_pathsep()
+local fn = t.fn
+local api = t.api
+local exec_lua = t.exec_lua
local testdir = 'Xtest-editorconfig'
@@ -20,8 +20,8 @@ local function test_case(name, expected)
end
setup(function()
- helpers.mkdir_p(testdir)
- helpers.write_file(
+ t.mkdir_p(testdir)
+ t.write_file(
testdir .. pathsep .. '.editorconfig',
[[
root = true
@@ -96,7 +96,7 @@ setup(function()
end)
teardown(function()
- helpers.rmdir(testdir)
+ t.rmdir(testdir)
end)
describe('editorconfig', function()
@@ -178,18 +178,18 @@ But not this one
-- luacheck: pop
local trimmed = untrimmed:gsub('%s+\n', '\n')
- helpers.write_file(filename, untrimmed)
+ t.write_file(filename, untrimmed)
command('edit ' .. filename)
command('write')
command('bdelete')
- eq(trimmed, helpers.read_file(filename))
+ eq(trimmed, t.read_file(filename))
filename = testdir .. pathsep .. 'no_trim.txt'
- helpers.write_file(filename, untrimmed)
+ t.write_file(filename, untrimmed)
command('edit ' .. filename)
command('write')
command('bdelete')
- eq(untrimmed, helpers.read_file(filename))
+ eq(untrimmed, t.read_file(filename))
end)
it('sets textwidth', function()