mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
tests: Style improvements and Makefile fix for migrated test 60. #2975
This commit is contained in:

committed by
Justin M. Keyes

parent
1e03165074
commit
d88c93acf3
@@ -144,7 +144,5 @@ test1.out: .gdbinit test1.in
|
|||||||
|
|
||||||
test49.out: test49.vim
|
test49.out: test49.vim
|
||||||
|
|
||||||
test60.out: test60.vim
|
|
||||||
|
|
||||||
nolog:
|
nolog:
|
||||||
-rm -f test.log
|
-rm -f test.log
|
||||||
|
@@ -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 helpers = require('test.functional.helpers')
|
||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
||||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||||
local write_file = helpers.write_file
|
local write_file = helpers.write_file
|
||||||
local os = require('os')
|
|
||||||
|
|
||||||
describe('exists() and has() functions', function()
|
describe('exists() and has() functions', function()
|
||||||
setup(clear)
|
setup(function()
|
||||||
|
clear()
|
||||||
it('is working', function()
|
|
||||||
|
|
||||||
-- Create a temporary script needed for the test.
|
-- Create a temporary script needed for the test.
|
||||||
write_file('test60.vim', [=[
|
write_file('test60.vim', [[
|
||||||
" Vim script for exists() function test
|
" Vim script for exists() function test
|
||||||
" Script-local variables are checked here
|
" Script-local variables are checked here
|
||||||
|
|
||||||
@@ -110,7 +107,14 @@ describe('exists() and has() functions', function()
|
|||||||
echo "FAILED"
|
echo "FAILED"
|
||||||
endif
|
endif
|
||||||
unlet str
|
unlet str
|
||||||
]=])
|
]])
|
||||||
|
end)
|
||||||
|
teardown(function()
|
||||||
|
os.remove('test.out')
|
||||||
|
os.remove('test60.vim')
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('is working', function()
|
||||||
|
|
||||||
source([=[
|
source([=[
|
||||||
" Add the special directory with test scripts to &rtp
|
" Add the special directory with test scripts to &rtp
|
||||||
@@ -648,7 +652,7 @@ describe('exists() and has() functions', function()
|
|||||||
]=])
|
]=])
|
||||||
|
|
||||||
-- Assert buffer contents.
|
-- Assert buffer contents.
|
||||||
expect([=[
|
expect([[
|
||||||
|
|
||||||
#myagroup: 1
|
#myagroup: 1
|
||||||
OK
|
OK
|
||||||
@@ -859,11 +863,7 @@ describe('exists() and has() functions', function()
|
|||||||
has patch 7.1.999: 1
|
has patch 7.1.999: 1
|
||||||
has patch 7.4.123: 1
|
has patch 7.4.123: 1
|
||||||
has patch 9.1.0: 0
|
has patch 9.1.0: 0
|
||||||
has patch 9.9.1: 0]=])
|
has patch 9.9.1: 0]])
|
||||||
|
|
||||||
end)
|
end)
|
||||||
teardown(function()
|
|
||||||
os.remove('test.out')
|
|
||||||
os.remove('test60.vim')
|
|
||||||
end)
|
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user