terminal,api: move PrintStack function (#2537)

Commit 30cdedae6910f5e9af6739845bacfd5b8778e745 introduced a dependency
from service/dap to pkg/terminal to call a stack printing function,
it's weird to have code that implements the DAP protocol depend on the
code for the JSON-RPC client.
Move PrintStack to a different package that can be called by both.
This commit is contained in:
Alessandro Arzilli
2021-06-16 22:05:17 +02:00
committed by GitHub
parent 1ecdb3be05
commit 29825d41a6
4 changed files with 74 additions and 66 deletions

View File

@ -943,6 +943,7 @@ func TestOptimizationCheck(t *testing.T) {
}
func TestTruncateStacktrace(t *testing.T) {
const stacktraceTruncatedMessage = "(truncated)"
withTestTerminal("stacktraceprog", t, func(term *FakeTerminal) {
term.MustExec("break main.stacktraceme")
term.MustExec("continue")