2022-07-09 16:58:25 +08:00
|
|
|
local Runner = require("tests.indent.common").Runner
|
|
|
|
|
|
|
|
|
|
local run = Runner:new(it, "tests/indent/ruby", {
|
|
|
|
|
shiftwidth = 2,
|
|
|
|
|
expandtab = true,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
describe("indent Ruby:", function()
|
2022-08-13 16:56:02 +08:00
|
|
|
describe("whole file:", function()
|
|
|
|
|
run:whole_file(".", {
|
2022-08-27 12:09:05 +02:00
|
|
|
expected_failures = { "./period-issue-3364.rb" },
|
2022-08-13 16:56:02 +08:00
|
|
|
})
|
|
|
|
|
end)
|
|
|
|
|
|
2022-07-09 16:58:25 +08:00
|
|
|
describe("new line:", function()
|
|
|
|
|
run:new_line("indent-unless.rb", { on_line = 1, text = "stmt", indent = 2 })
|
|
|
|
|
run:new_line("indent-assignment.rb", { on_line = 1, text = "1 +", indent = 2 })
|
2022-08-13 16:06:07 +08:00
|
|
|
run:new_line("indent-parenthesized-statements.rb", { on_line = 1, text = "stmt", indent = 2 })
|
2022-07-09 16:58:25 +08:00
|
|
|
end)
|
|
|
|
|
end)
|