Skip to content

Commit

Permalink
Format with stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
L3MON4D3 committed Aug 1, 2024
1 parent e6fd263 commit 5a0ce2b
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions tests/integration/snippet_ft_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ describe("snippet-ft tooling", function()
[5] = { foreground = Screen.colors.Yellow1 },
[6] = { foreground = Screen.colors.Magenta1 },
[7] = { bold = true, foreground = Screen.colors.Blue1 },
[8] = { foreground = Screen.colors.Blue4, background = Screen.colors.LightGray },
[8] = {
foreground = Screen.colors.Blue4,
background = Screen.colors.LightGray,
},
})
exec([[
hi Identifier guifg=Red
Expand All @@ -43,9 +46,17 @@ describe("snippet-ft tooling", function()
end)

it("syntax works as expected", function()
exec(("edit %s"):format(os.getenv("LUASNIP_SOURCE") .. "/tests/data/syntaxtest.snippets"))
exec(
("edit %s"):format(
os.getenv("LUASNIP_SOURCE") .. "/tests/data/syntaxtest.snippets"
)
)

exec(("source %s/syntax/snippets.vim"):format(os.getenv("LUASNIP_SOURCE")))
exec(
("source %s/syntax/snippets.vim"):format(
os.getenv("LUASNIP_SOURCE")
)
)

screen:expect({
grid = [[
Expand Down Expand Up @@ -78,14 +89,27 @@ describe("snippet-ft tooling", function()
{7:~ }|
{7:~ }|
{7:~ }|
|]] })
|]],
})
end)

it("folding works as expected", function()
exec(("edit %s"):format(os.getenv("LUASNIP_SOURCE") .. "/tests/data/syntaxtest.snippets"))
exec(
("edit %s"):format(
os.getenv("LUASNIP_SOURCE") .. "/tests/data/syntaxtest.snippets"
)
)

exec(("source %s/ftplugin/snippets.vim"):format(os.getenv("LUASNIP_SOURCE")))
exec(("source %s/syntax/snippets.vim"):format(os.getenv("LUASNIP_SOURCE")))
exec(
("source %s/ftplugin/snippets.vim"):format(
os.getenv("LUASNIP_SOURCE")
)
)
exec(
("source %s/syntax/snippets.vim"):format(
os.getenv("LUASNIP_SOURCE")
)
)

exec("set foldenable foldlevel=99")
feed("zM")
Expand Down Expand Up @@ -121,6 +145,7 @@ describe("snippet-ft tooling", function()
{7:~ }|
{7:~ }|
{7:~ }|
|]] })
|]],
})
end)
end)

0 comments on commit 5a0ce2b

Please sign in to comment.