aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/rust_spec.lua
diff options
context:
space:
mode:
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 040e8c2f9..ab2e48d42 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 })