fredrikaverpil / neotest-golang

Reliable Neotest adapter for running Go tests in Neovim.
MIT License
139 stars 17 forks source link

fix: keep all lines until next log entry #179

Closed fredrikaverpil closed 2 months ago

fredrikaverpil commented 2 months ago

Why?

When running :lua require("neotest-golang.utils.buffer").filter("[neotest-golang]"), the filter will not keep newlines for the log entry.

What?

Before:

DEBUG | 2024-09-07T17:28:13Z+0200 | ...ode/public/neotest-golang/lua/neotest-golang/logging.lua:47 | [neotest-golang] DAP strategy used: {
DEBUG | 2024-09-07T17:28:13Z+0200 | ...ode/public/neotest-golang/lua/neotest-golang/logging.lua:47 | [neotest-golang] Provided dap_go_opts for DAP:  {

After:

DEBUG | 2024-09-07T17:31:39Z+0200 | ...ode/public/neotest-golang/lua/neotest-golang/logging.lua:47 | [neotest-golang] DAP strategy used: {
  args = { "-test.run", "^TestTopLevelWithSubTest/SubTest$" },
  buildFlags = { "-tags=integration" },
  mode = "test",
  name = "Neotest-golang",
  program = "${fileDirname}",
  request = "launch",
  type = "go"
}
DEBUG | 2024-09-07T17:31:39Z+0200 | ...ode/public/neotest-golang/lua/neotest-golang/logging.lua:47 | [neotest-golang] Provided dap_go_opts for DAP:  {
  delve = {
    build_flags = { "-tags=integration" },
    cwd = "/Users/fredrik/code/public/neotest-golang/tests/go"
  }
}