2023-06-12 09:54:30 -06:00
|
|
|
local Runner = require('tests.indent.common').Runner
|
2024-01-19 16:08:23 +01:00
|
|
|
|
2023-06-12 09:54:30 -06:00
|
|
|
local run = Runner:new(it, 'tests/indent/meson', {
|
2024-01-19 16:08:23 +01:00
|
|
|
tabstop = 2,
|
|
|
|
|
shiftwidth = 2,
|
|
|
|
|
softtabstop = 0,
|
|
|
|
|
expandtab = true,
|
|
|
|
|
})
|
|
|
|
|
|
2023-06-12 09:54:30 -06:00
|
|
|
describe('indent Meson:', function()
|
|
|
|
|
describe('whole file:', function()
|
|
|
|
|
run:whole_file('.', {
|
2024-01-19 16:08:23 +01:00
|
|
|
expected_failures = {},
|
|
|
|
|
})
|
|
|
|
|
end)
|
|
|
|
|
|
2023-06-12 09:54:30 -06:00
|
|
|
describe('new line:', function()
|
|
|
|
|
run:new_line('cond.meson', { on_line = 3, text = 'foo()', indent = 2 })
|
|
|
|
|
run:new_line('cond.meson', { on_line = 6, text = 'foo()', indent = 2 })
|
|
|
|
|
run:new_line('cond.meson', { on_line = 7, text = 'foo()', indent = 2 })
|
|
|
|
|
run:new_line('cond.meson', { on_line = 12, text = 'foo()', indent = 2 })
|
|
|
|
|
run:new_line('cond.meson', { on_line = 14, text = 'foo()', indent = 2 })
|
|
|
|
|
run:new_line('dict.meson', { on_line = 13, text = ",'x':1,", indent = 2 })
|
|
|
|
|
run:new_line('loop.meson', { on_line = 3, text = 'foo()', indent = 2 })
|
|
|
|
|
run:new_line('loop.meson', { on_line = 7, text = 'foo()', indent = 2 })
|
|
|
|
|
run:new_line('ternary.meson', { on_line = 11, text = 'x : y', indent = 2 })
|
2024-01-19 16:08:23 +01:00
|
|
|
end)
|
|
|
|
|
end)
|