cmd/geth, jsre: restore command line editing on windows
PR #856 broke command line editing by wrapping stdout with a filter that interprets ANSI escape sequences to fix colored printing on windows. Implement the printer in Go instead so it can do its own platform-dependent coloring. As a nice side effect, the JS console is now noticeably more responsive when printing results. Fixes #1608 Fixes #1612
This commit is contained in:
@ -103,19 +103,14 @@ func TestNatto(t *testing.T) {
|
||||
|
||||
func TestBind(t *testing.T) {
|
||||
jsre := New("")
|
||||
defer jsre.Stop(false)
|
||||
|
||||
jsre.Bind("no", &testNativeObjectBinding{})
|
||||
|
||||
val, err := jsre.Run(`no.TestMethod("testMsg")`)
|
||||
_, err := jsre.Run(`no.TestMethod("testMsg")`)
|
||||
if err != nil {
|
||||
t.Errorf("expected no error, got %v", err)
|
||||
}
|
||||
pp, err := jsre.PrettyPrint(val)
|
||||
if err != nil {
|
||||
t.Errorf("expected no error, got %v", err)
|
||||
}
|
||||
t.Logf("no: %v", pp)
|
||||
jsre.Stop(false)
|
||||
}
|
||||
|
||||
func TestLoadScript(t *testing.T) {
|
||||
@ -139,4 +134,4 @@ func TestLoadScript(t *testing.T) {
|
||||
t.Errorf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
jsre.Stop(false)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user