Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-reineke committed Sep 28, 2023
1 parent c43385c commit 090dca5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion lua/ibl/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ local validate_config = function(config)
node_type = { config.scope.exclude.node_type, "table", true },
}
end
if config.scope.exclude then
if config.scope.include then
vim.validate {
node_type = { config.scope.include.node_type, "table", true },
}
Expand Down
94 changes: 47 additions & 47 deletions specs/features/virt_text_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,10 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "f", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "f", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "f", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "f", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
})
end)

Expand All @@ -338,12 +338,12 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "a", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "b", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "c", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "a", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "b", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "c", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
})
end)

Expand All @@ -368,12 +368,12 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "a", "@indent.char.1" },
{ "d", "@indent.whitespace.1" },
{ "b", "@indent.char.1" },
{ "d", "@indent.whitespace.1" },
{ "c", "@indent.char.1" },
{ "d", "@indent.whitespace.1" },
{ "a", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "d", { "@ibl.whitespace.char.1" } },
{ "b", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "d", { "@ibl.whitespace.char.1" } },
{ "c", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "d", { "@ibl.whitespace.char.1" } },
})
end)

Expand All @@ -398,10 +398,10 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "e", "@indent.whitespace.1" },
{ "e", "@indent.whitespace.1" },
{ "e", "@indent.whitespace.1" },
{ "e", "@indent.whitespace.1" },
{ "e", { "@ibl.whitespace.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
})
end)

Expand All @@ -426,10 +426,10 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "f", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "f", "@indent.scope.char.1.1" },
{ "e", "@indent.whitespace.1" },
{ "f", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "f", { "@ibl.whitespace.char.1", "@ibl.scope.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
})
end)

Expand All @@ -454,11 +454,11 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "a", "@indent.char.1" },
{ "c", "@indent.whitespace.1" },
{ "c", "@indent.whitespace.1" },
{ "d", "@indent.whitespace.1" },
{ "b", "@indent.char.1" },
{ "a", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "c", { "@ibl.whitespace.char.1" } },
{ "c", { "@ibl.whitespace.char.1" } },
{ "d", { "@ibl.whitespace.char.1" } },
{ "b", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
})
end)

Expand Down Expand Up @@ -486,12 +486,12 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "f", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "f", "@indent.char.2" },
{ "e", "@indent.whitespace.2" },
{ "f", "@indent.char.3" },
{ "e", "@indent.whitespace.3" },
{ "f", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "f", { "@ibl.whitespace.char.2", "@ibl.indent.char.2" } },
{ "e", { "@ibl.whitespace.char.2" } },
{ "f", { "@ibl.whitespace.char.3", "@ibl.indent.char.3" } },
{ "e", { "@ibl.whitespace.char.3" } },
})
end)

Expand Down Expand Up @@ -520,12 +520,12 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "f", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "f", "@indent.scope.char.2.2" },
{ "e", "@indent.whitespace.2" },
{ "f", "@indent.char.3" },
{ "e", "@indent.whitespace.3" },
{ "f", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "f", { "@ibl.whitespace.char.2", "@ibl.scope.char.2" } },
{ "e", { "@ibl.whitespace.char.2" } },
{ "f", { "@ibl.whitespace.char.3", "@ibl.indent.char.3" } },
{ "e", { "@ibl.whitespace.char.3" } },
})
end)

Expand Down Expand Up @@ -554,12 +554,12 @@ describe("virt_text", function()
vt.get(config, char_map, whitespace_tbl, scope_active, scope_index, scope_end, scope_col_start_single)

assert.are.same(virt_text, {
{ "f", "@indent.char.1" },
{ "e", "@indent.whitespace.1" },
{ "f", "@indent.scope.corner.2.2" },
{ "e", "@indent.scope.end.2.2" },
{ "f", "@indent.scope.end.3.2" },
{ "e", "@indent.scope.end.3.2" },
{ "f", { "@ibl.whitespace.char.1", "@ibl.indent.char.1" } },
{ "e", { "@ibl.whitespace.char.1" } },
{ "f", { "@ibl.whitespace.char.2", "@ibl.scope.char.2", "@ibl.scope.underline.2" } },
{ "e", { "@ibl.whitespace.char.2", "@ibl.scope.underline.2" } },
{ "f", { "@ibl.whitespace.char.3", "@ibl.indent.char.3", "@ibl.scope.underline.2" } },
{ "e", { "@ibl.whitespace.char.3", "@ibl.scope.underline.2" } },
})
end)
end)

0 comments on commit 090dca5

Please sign in to comment.