From 0ef80bb3d05ecb44297d25c889a85555bc55ef0c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 11 Aug 2015 17:14:46 +0100 Subject: 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 --- jsre/jsre_test.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'jsre/jsre_test.go') diff --git a/jsre/jsre_test.go b/jsre/jsre_test.go index 93dc7d1f9..8450f546c 100644 --- a/jsre/jsre_test.go +++ b/jsre/jsre_test.go @@ -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) -} \ No newline at end of file +} -- cgit v1.2.3