aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/060_exists_and_has_functions_spec.lua
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2015-06-16 03:00:49 +0200
committerJustin M. Keyes <justinkz@gmail.com>2015-07-16 20:31:20 -0400
commitd88c93acf390ea9d5e8674283927cff60fb41e0d (patch)
treef84ffbe6833fd9709449b55cbac103dcd009e134 /test/functional/legacy/060_exists_and_has_functions_spec.lua
parent1e031650742310920e7d8ed10c02ceccb54e0a89 (diff)
downloadrneovim-d88c93acf390ea9d5e8674283927cff60fb41e0d.tar.gz
rneovim-d88c93acf390ea9d5e8674283927cff60fb41e0d.tar.bz2
rneovim-d88c93acf390ea9d5e8674283927cff60fb41e0d.zip
tests: Style improvements and Makefile fix for migrated test 60. #2975
Diffstat (limited to 'test/functional/legacy/060_exists_and_has_functions_spec.lua')
-rw-r--r--test/functional/legacy/060_exists_and_has_functions_spec.lua28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/functional/legacy/060_exists_and_has_functions_spec.lua b/test/functional/legacy/060_exists_and_has_functions_spec.lua
index c4d2b01522..e9b79b490d 100644
--- a/test/functional/legacy/060_exists_and_has_functions_spec.lua
+++ b/test/functional/legacy/060_exists_and_has_functions_spec.lua
@@ -1,18 +1,15 @@
--- Tests for the exists() and has() functions. ts=8 sw=2
+-- Tests for the exists() and has() functions.
local helpers = require('test.functional.helpers')
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
local write_file = helpers.write_file
-local os = require('os')
describe('exists() and has() functions', function()
- setup(clear)
-
- it('is working', function()
-
+ setup(function()
+ clear()
-- Create a temporary script needed for the test.
- write_file('test60.vim', [=[
+ write_file('test60.vim', [[
" Vim script for exists() function test
" Script-local variables are checked here
@@ -110,7 +107,14 @@ describe('exists() and has() functions', function()
echo "FAILED"
endif
unlet str
- ]=])
+ ]])
+ end)
+ teardown(function()
+ os.remove('test.out')
+ os.remove('test60.vim')
+ end)
+
+ it('is working', function()
source([=[
" Add the special directory with test scripts to &rtp
@@ -648,7 +652,7 @@ describe('exists() and has() functions', function()
]=])
-- Assert buffer contents.
- expect([=[
+ expect([[
#myagroup: 1
OK
@@ -859,11 +863,7 @@ describe('exists() and has() functions', function()
has patch 7.1.999: 1
has patch 7.4.123: 1
has patch 9.1.0: 0
- has patch 9.9.1: 0]=])
+ has patch 9.9.1: 0]])
end)
- teardown(function()
- os.remove('test.out')
- os.remove('test60.vim')
- end)
end)