mirror of
https://github.com/neovim/neovim.git
synced 2025-11-05 18:24:22 +00:00
test: lint whitespace in legacy/ (#7308)
This commit is contained in:
committed by
Justin M. Keyes
parent
2b4a52f901
commit
126b2ca077
@@ -17,4 +17,4 @@ ignore = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Ignore whitespace issues in converted Vim legacy tests.
|
-- Ignore whitespace issues in converted Vim legacy tests.
|
||||||
files["functional/legacy"] = {ignore = { "611", "612", "613", "621" }}
|
--files["functional/legacy"] = {ignore = { "611", "612", "613", "621" }}
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ local function insert_(content)
|
|||||||
feed_command('1', 'set cin ts=4 sw=4')
|
feed_command('1', 'set cin ts=4 sw=4')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
describe('cindent', function()
|
describe('cindent', function()
|
||||||
before_each(clear)
|
before_each(clear)
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ local wait = helpers.wait
|
|||||||
describe('test5', function()
|
describe('test5', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
start of test file Xxx
|
start of test file Xxx
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ describe('file reading, writing and bufnew and filter autocommands', function()
|
|||||||
eq(gzip_data, io.open('Xtestfile.gz'):read('*all'))
|
eq(gzip_data, io.open('Xtestfile.gz'):read('*all'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
|
-- luacheck: ignore 611 (Line contains only whitespaces)
|
||||||
it('FileReadPre, FileReadPost', function()
|
it('FileReadPre, FileReadPost', function()
|
||||||
prepare_gz_file('Xtestfile', text1)
|
prepare_gz_file('Xtestfile', text1)
|
||||||
feed_command('au! FileReadPre *.gz exe "silent !gzip -d " . shellescape(expand("<afile>"))')
|
feed_command('au! FileReadPre *.gz exe "silent !gzip -d " . shellescape(expand("<afile>"))')
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers
|
|||||||
describe('alignment', function()
|
describe('alignment', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
test for :left
|
test for :left
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers
|
|||||||
describe([[performing "r<Tab>" with 'smarttab' and 'expandtab' set/not set, and "dv_"]], function()
|
describe([[performing "r<Tab>" with 'smarttab' and 'expandtab' set/not set, and "dv_"]], function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
start text
|
start text
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ local feed_command = helpers.feed_command
|
|||||||
describe('joining lines', function()
|
describe('joining lines', function()
|
||||||
before_each(clear)
|
before_each(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespaces in a string)
|
||||||
|
-- luacheck: ignore 611 (Line contains only whitespaces)
|
||||||
it("keeps marks with different 'joinspaces' settings", function()
|
it("keeps marks with different 'joinspaces' settings", function()
|
||||||
insert([[
|
insert([[
|
||||||
firstline
|
firstline
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ local wait = helpers.wait
|
|||||||
describe('lisp indent', function()
|
describe('lisp indent', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
(defun html-file (base)
|
(defun html-file (base)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers
|
|||||||
describe('Virtual replace mode', function()
|
describe('Virtual replace mode', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
-- Make sure that backspace works, no matter what termcap is used.
|
-- Make sure that backspace works, no matter what termcap is used.
|
||||||
feed_command('set t_kD=x7f t_kb=x08')
|
feed_command('set t_kD=x7f t_kb=x08')
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ describe('Visual block mode', function()
|
|||||||
abcdqqqqijklm]])
|
abcdqqqqijklm]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 611 (Line contains only whitespaces)
|
||||||
it('should insert a block using cursor keys for movement', function()
|
it('should insert a block using cursor keys for movement', function()
|
||||||
insert([[
|
insert([[
|
||||||
aaaaaa
|
aaaaaa
|
||||||
@@ -104,6 +105,7 @@ describe('Visual block mode', function()
|
|||||||
456ab7]])
|
456ab7]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('should insert and append a block when virtualedit=all', function()
|
it('should insert and append a block when virtualedit=all', function()
|
||||||
insert([[
|
insert([[
|
||||||
line1
|
line1
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ describe('list and dictionary types', function()
|
|||||||
[3]]=])
|
[3]]=])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
it('assignment to a list', function()
|
it('assignment to a list', function()
|
||||||
source([[
|
source([[
|
||||||
let l = [0, 1, 2, 3]
|
let l = [0, 1, 2, 3]
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ local expect = helpers.expect
|
|||||||
describe('text formatting', function()
|
describe('text formatting', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
-- The control character <C-A> (byte \x01) needs to be put in the buffer
|
-- The control character <C-A> (byte \x01) needs to be put in the buffer
|
||||||
-- directly. But the insert function sends the text to nvim in insert
|
-- directly. But the insert function sends the text to nvim in insert
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ local feed_command, expect = helpers.feed_command, helpers.expect
|
|||||||
describe('coptions', function()
|
describe('coptions', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
aaa two three four
|
aaa two three four
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ local clear, expect = helpers.clear, helpers.expect
|
|||||||
describe('curswant', function()
|
describe('curswant', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
start target options
|
start target options
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ end
|
|||||||
describe('cursor and column position with conceal and tabulators', function()
|
describe('cursor and column position with conceal and tabulators', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('are working', function()
|
it('are working', function()
|
||||||
insert([[
|
insert([[
|
||||||
start:
|
start:
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('store cursor position in session file in UTF-8', function()
|
|||||||
os.remove('test.out')
|
os.remove('test.out')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
start:
|
start:
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ describe('store cursor position in session file in Latin-1', function()
|
|||||||
os.remove('test.out')
|
os.remove('test.out')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
start:
|
start:
|
||||||
|
|||||||
@@ -372,6 +372,7 @@ describe('Visual mode and operator', function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
it('gv in exclusive select mode after operation', function()
|
it('gv in exclusive select mode after operation', function()
|
||||||
source([[
|
source([[
|
||||||
$put ='zzz '
|
$put ='zzz '
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers
|
|||||||
describe('breakindent', function()
|
describe('breakindent', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
|
-- luacheck: ignore 611 (Line contains only whitespaces)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert('dummy text')
|
insert('dummy text')
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ local helpers = require('test.functional.helpers')(after_each)
|
|||||||
local clear, source, expect = helpers.clear, helpers.source, helpers.expect
|
local clear, source, expect = helpers.clear, helpers.source, helpers.expect
|
||||||
local feed_command = helpers.feed_command
|
local feed_command = helpers.feed_command
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
describe('command_count', function()
|
describe('command_count', function()
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
-- It is relevant for the test to load a file initially. If this is
|
-- It is relevant for the test to load a file initially. If this is
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ local clear, feed, expect = helpers.clear, helpers.feed, helpers.expect
|
|||||||
describe('CTRL-W in Insert mode', function()
|
describe('CTRL-W in Insert mode', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 611 (Line contains only whitespaces)
|
||||||
it('works for multi-byte characters', function()
|
it('works for multi-byte characters', function()
|
||||||
|
|
||||||
for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ local helpers = require('test.functional.helpers')(after_each)
|
|||||||
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
local feed, insert, source = helpers.feed, helpers.insert, helpers.source
|
||||||
local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect
|
local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
describe("'listchars'", function()
|
describe("'listchars'", function()
|
||||||
before_each(function()
|
before_each(function()
|
||||||
clear()
|
clear()
|
||||||
feed_command('set listchars&vi')
|
feed_command('set listchars&vi')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
it("works with 'list'", function()
|
it("works with 'list'", function()
|
||||||
source([[
|
source([[
|
||||||
function GetScreenCharsForLine(lnum)
|
function GetScreenCharsForLine(lnum)
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers
|
|||||||
describe('listlbr', function()
|
describe('listlbr', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
|
-- luacheck: ignore 611 (Line contains only whitespaces)
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespaces in a string)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([[
|
insert([[
|
||||||
dummy text]])
|
dummy text]])
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ local clear, expect = helpers.clear, helpers.expect
|
|||||||
describe('linebreak', function()
|
describe('linebreak', function()
|
||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespaces in a string)
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
source([[
|
source([[
|
||||||
set wildchar=^E
|
set wildchar=^E
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ describe('marks', function()
|
|||||||
clear()
|
clear()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 621 (Indentation)
|
||||||
it('restores a deleted mark after delete-undo-redo-undo', function()
|
it('restores a deleted mark after delete-undo-redo-undo', function()
|
||||||
insert([[
|
insert([[
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ describe('utf8', function()
|
|||||||
eq(1, eval('strchars("\\u20dd", 1)'))
|
eq(1, eval('strchars("\\u20dd", 1)'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- luacheck: ignore 613 (Trailing whitespace in a string)
|
||||||
it('customlist completion', function()
|
it('customlist completion', function()
|
||||||
source([[
|
source([[
|
||||||
function! CustomComplete1(lead, line, pos)
|
function! CustomComplete1(lead, line, pos)
|
||||||
|
|||||||
Reference in New Issue
Block a user