terminal: Refactor handling of dumb terminals

This commit is contained in:
Derek Parker
2015-09-29 22:42:06 -07:00
parent 76b9aa03bb
commit 80107dba8d
3 changed files with 119 additions and 135 deletions

View File

@ -3,8 +3,6 @@ package terminal
import (
"fmt"
"testing"
"github.com/derekparker/delve/service"
)
func TestCommandDefault(t *testing.T) {
@ -25,7 +23,7 @@ func TestCommandDefault(t *testing.T) {
func TestCommandReplay(t *testing.T) {
cmds := DebugCommands(nil)
cmds.Register("foo", func(client service.Client, args ...string) error { return fmt.Errorf("registered command") }, "foo command")
cmds.Register("foo", func(t *Term, args ...string) error { return fmt.Errorf("registered command") }, "foo command")
cmd := cmds.Find("foo")
err := cmd(nil)