aboutsummaryrefslogtreecommitdiffstats
path: root/jsre/jsre_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-08-12 00:14:46 +0800
committerFelix Lange <fjl@twurst.com>2015-08-12 18:04:00 +0800
commit0ef80bb3d05ecb44297d25c889a85555bc55ef0c (patch)
treee20fd801a5cd219ee8e5dcf82acd003a44bb02e5 /jsre/jsre_test.go
parent05c66529b2c22fba20c55a69c4817395c532d4c8 (diff)
downloadgo-tangerine-0ef80bb3d05ecb44297d25c889a85555bc55ef0c.tar
go-tangerine-0ef80bb3d05ecb44297d25c889a85555bc55ef0c.tar.gz
go-tangerine-0ef80bb3d05ecb44297d25c889a85555bc55ef0c.tar.bz2
go-tangerine-0ef80bb3d05ecb44297d25c889a85555bc55ef0c.tar.lz
go-tangerine-0ef80bb3d05ecb44297d25c889a85555bc55ef0c.tar.xz
go-tangerine-0ef80bb3d05ecb44297d25c889a85555bc55ef0c.tar.zst
go-tangerine-0ef80bb3d05ecb44297d25c889a85555bc55ef0c.zip
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
Diffstat (limited to 'jsre/jsre_test.go')
-rw-r--r--jsre/jsre_test.go11
1 files changed, 3 insertions, 8 deletions
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
+}