summaryrefslogtreecommitdiff
path: root/tests/indent/rust_spec.lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-11-20 15:14:56 +0100
committerStephan Seitz <stephan.seitz@fau.de>2021-11-24 17:29:55 +0100
commitc7634f16dee010d092cad867959a51962406fc62 (patch)
tree9e4747a585df28ff7239a85b099c22bddedb010b /tests/indent/rust_spec.lua
parent0f3c94cf7237f8d0ba613666394e248d1947de77 (diff)
Mark failing indent tests to add them to CI
Expected failures should be monitored so that we don't have regressions and also remove failure marks when they are resolved.
Diffstat (limited to 'tests/indent/rust_spec.lua')
-rw-r--r--tests/indent/rust_spec.lua19
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/indent/rust_spec.lua b/tests/indent/rust_spec.lua
index 040e8c2f..ab2e48d4 100644
--- a/tests/indent/rust_spec.lua
+++ b/tests/indent/rust_spec.lua
@@ -1,4 +1,5 @@
local Runner = require("tests.indent.common").Runner
+local XFAIL = require("tests.indent.common").XFAIL
local run = Runner:new(it, "tests/indent/rust", {
tabstop = 4,
@@ -9,7 +10,17 @@ local run = Runner:new(it, "tests/indent/rust", {
describe("indent Rust:", function()
describe("whole file:", function()
- run:whole_file "."
+ run:whole_file(".", {
+ expected_failures = {
+ "./enum.rs",
+ "./func.rs",
+ "./array.rs",
+ "./where.rs",
+ "./trait.rs",
+ "./string.rs",
+ "./macro.rs",
+ },
+ })
end)
describe("new line:", function()
@@ -18,8 +29,8 @@ describe("indent Rust:", function()
run:new_line("comment.rs", { on_line = 3, text = "a", indent = "/// " })
run:new_line("cond.rs", { on_line = 11, text = "x += 1;", indent = 12 })
run:new_line("cond.rs", { on_line = 2, text = "x += 1;", indent = 8 })
- run:new_line("cond.rs", { on_line = 4, text = "x += 1;", indent = 8 })
- run:new_line("cond.rs", { on_line = 6, text = "x += 1;", indent = 8 })
+ run:new_line("cond.rs", { on_line = 4, text = "x += 1;", indent = 8 }, "expected_failures", XFAIL)
+ run:new_line("cond.rs", { on_line = 6, text = "x += 1;", indent = 8 }, "expected_failures", XFAIL)
run:new_line("enum.rs", { on_line = 2, text = "Q,", indent = 4 })
run:new_line("enum.rs", { on_line = 4, text = "i32,", indent = 8 })
run:new_line("enum.rs", { on_line = 8, text = "z: u32,", indent = 8 })
@@ -38,7 +49,7 @@ describe("indent Rust:", function()
run:new_line("mod.rs", { on_line = 1, text = "const Z: i32 = 1;", indent = 4 })
run:new_line("mod.rs", { on_line = 2, text = "const Z: i32 = 1;", indent = 4 })
run:new_line("mod.rs", { on_line = 6, text = "const Z: i32 = 1;", indent = 8 })
- run:new_line("string.rs", { on_line = 2, text = "brave new", indent = 0 })
+ run:new_line("string.rs", { on_line = 2, text = "brave new", indent = 0 }, "expected_failures", XFAIL)
run:new_line("string.rs", { on_line = 5, text = "brave new \\", indent = 8 })
run:new_line("string.rs", { on_line = 9, text = "brave new \\", indent = 8 })
run:new_line("struct.rs", { on_line = 1, text = "z: i32,", indent = 4 })