From 1359b5b0ce8b711c033e7d529eb0a504bd606e1e Mon Sep 17 00:00:00 2001 From: glepnir Date: Mon, 26 Aug 2024 19:42:32 +0800 Subject: [PATCH] test: fix ci failed about lint --- test/indentmini_spec.lua | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/test/indentmini_spec.lua b/test/indentmini_spec.lua index c15914e..6fb2317 100644 --- a/test/indentmini_spec.lua +++ b/test/indentmini_spec.lua @@ -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)