Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: When test throws an exception, stacktrace shown in dap repl is truncated #737

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lua/jdtls/junit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function M.mk_test_results(bufnr)
local testMatch
for _, msg in ipairs(test.traces) do
local match = msg:match(string.format('at %s.%s', test.fq_class, test.method) .. '%(([%w%p]*:%d+)%)')
if match then
if ((not testMatch) and match) then
testMatch = true
local lnum = vim.split(match, ':')[2]
local trace = table.concat(test.traces, '\n')
Expand All @@ -150,7 +150,6 @@ function M.mk_test_results(bufnr)
source = 'junit',
message = cause,
})
break
end
repl.append(msg, '$')
end
Expand Down
Loading