Skip to content

Commit

Permalink
test: fix ci failed about lint
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Aug 26, 2024
1 parent 4a246ea commit 1359b5b
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions test/indentmini_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,62 +124,62 @@ describe('indent mini', function()
assert.same(expected, screenstr)
end)

it('works on blank line case 2', function ()
it('works on blank line case 2', function()
local lines = {
"local function test()",
" if true then",
" if true then",
'local function test()',
' if true then',
' if true then',
" print('hello')",
"",
" if true then",
'',
' if true then',
" print('hello')",
" end",
" end",
" end",
"end"
' end',
' end',
' end',
'end',
}
local screenstr = screen(lines)
local expected = {
"local function test() ",
"│ if true then ",
"│ │ if true then ",
'local function test() ',
'│ if true then ',
'│ │ if true then ',
"│ │ │ print('hello') ",
"│ │ │ ",
"│ │ │ if true then ",
'│ │ │ ',
'│ │ │ if true then ',
"│ │ │ │ print('hello') ",
"│ │ │ end ",
"│ │ end ",
"│ end ",
"end "
'│ │ │ end ',
'│ │ end ',
'│ end ',
'end ',
}
assert.same(expected, screenstr)
end)

it('works test case 3', function ()
it('works test case 3', function()
local lines = {
"local opt = {",
" only_current = false,",
"}",
"",
"local function test()",
" print('hello')",
" if true then",
" print('hello')",
" end",
"end",
'local opt = {',
' only_current = false,',
'}',
'',
'local function test()',
" print('hello')",
' if true then',
" print('hello')",
' end',
'end',
}
local screenstr = screen(lines)
local expected = {
"local opt = { ",
"│ only_current = false, ",
"} ",
" ",
"local function test() ",
'local opt = { ',
'│ only_current = false, ',
'} ',
' ',
'local function test() ',
"│ print('hello') ",
"│ if true then ",
'│ if true then ',
"│ │ print('hello') ",
"│ end ",
"end "
'│ end ',
'end ',
}
same(expected, screenstr)
end)
Expand Down

0 comments on commit 1359b5b

Please sign in to comment.