Skip to content

Commit

Permalink
test: add a test for shell formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Aug 17, 2024
1 parent 5eda2a8 commit f9686cd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/runner_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -395,5 +395,13 @@ print("a")
assert.are.same({ "a", "d", "c" }, vim.api.nvim_buf_get_lines(0, 0, -1, false))
end)
end)

it("can run the format command in the shell", function()
conform.formatters.test = {
command = "echo",
args = '-e "world\nhello" | sort',
}
run_formatter_test("", "hello\nworld")
end)
end)
end)

0 comments on commit f9686cd

Please sign in to comment.