aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/rust_spec.lua
diff options
context:
space:
mode:
authorMunif Tanjim <hello@muniftanjim.dev>2022-01-18 21:17:26 +0600
committerChristian Clason <christian.clason@uni-due.de>2022-01-21 10:51:51 +0100
commitc0110e34aa8ef53480c7aac6ffa5b9f8227a96bd (patch)
treec31796e3cdc7165dbc49e05b9e0c2eb79dca9896 /tests/indent/rust_spec.lua
parentfeat: improve indent module (diff)
downloadnvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.gz
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.bz2
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.lz
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.xz
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.zst
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.zip
feat: rewrite indent module
Diffstat (limited to 'tests/indent/rust_spec.lua')
-rw-r--r--tests/indent/rust_spec.lua19
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/indent/rust_spec.lua b/tests/indent/rust_spec.lua
index ab2e48d42..040e8c2f9 100644
--- a/tests/indent/rust_spec.lua
+++ b/tests/indent/rust_spec.lua
@@ -1,5 +1,4 @@
local Runner = require("tests.indent.common").Runner
-local XFAIL = require("tests.indent.common").XFAIL
local run = Runner:new(it, "tests/indent/rust", {
tabstop = 4,
@@ -10,17 +9,7 @@ local run = Runner:new(it, "tests/indent/rust", {
describe("indent Rust:", function()
describe("whole file:", function()
- run:whole_file(".", {
- expected_failures = {
- "./enum.rs",
- "./func.rs",
- "./array.rs",
- "./where.rs",
- "./trait.rs",
- "./string.rs",
- "./macro.rs",
- },
- })
+ run:whole_file "."
end)
describe("new line:", function()
@@ -29,8 +18,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 }, "expected_failures", XFAIL)
- run:new_line("cond.rs", { on_line = 6, text = "x += 1;", indent = 8 }, "expected_failures", XFAIL)
+ 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("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 })
@@ -49,7 +38,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 }, "expected_failures", XFAIL)
+ run:new_line("string.rs", { on_line = 2, text = "brave new", indent = 0 })
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 })