aboutsummaryrefslogtreecommitdiffstats
path: root/console/console_test.go
diff options
context:
space:
mode:
authorJanos Guljas <janos@resenje.org>2017-12-14 17:35:49 +0800
committerJanos Guljas <janos@resenje.org>2017-12-14 17:36:12 +0800
commit47a801455966298d1d1519eebb955024c8f02b84 (patch)
tree5b8144ba4844092dc0bae599fc3314eaacf1a7b4 /console/console_test.go
parent19982f946735948478b6b7e7706f1b615f171d0d (diff)
parent3654aeaa4f87452ac5bc801a18808189595e2ef8 (diff)
downloadgo-tangerine-47a801455966298d1d1519eebb955024c8f02b84.tar
go-tangerine-47a801455966298d1d1519eebb955024c8f02b84.tar.gz
go-tangerine-47a801455966298d1d1519eebb955024c8f02b84.tar.bz2
go-tangerine-47a801455966298d1d1519eebb955024c8f02b84.tar.lz
go-tangerine-47a801455966298d1d1519eebb955024c8f02b84.tar.xz
go-tangerine-47a801455966298d1d1519eebb955024c8f02b84.tar.zst
go-tangerine-47a801455966298d1d1519eebb955024c8f02b84.zip
cmd/swarm: Merge branch 'master' into multiple-ens-endpoints
Fix a conflict in cmd/swarm envVarsOverride function.
Diffstat (limited to 'console/console_test.go')
-rw-r--r--console/console_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/console/console_test.go b/console/console_test.go
index 05aec2cc0..7b1629c03 100644
--- a/console/console_test.go
+++ b/console/console_test.go
@@ -164,7 +164,7 @@ func TestWelcome(t *testing.T) {
tester.console.Welcome()
- output := string(tester.output.Bytes())
+ output := tester.output.String()
if want := "Welcome"; !strings.Contains(output, want) {
t.Fatalf("console output missing welcome message: have\n%s\nwant also %s", output, want)
}
@@ -188,7 +188,7 @@ func TestEvaluate(t *testing.T) {
defer tester.Close(t)
tester.console.Evaluate("2 + 2")
- if output := string(tester.output.Bytes()); !strings.Contains(output, "4") {
+ if output := tester.output.String(); !strings.Contains(output, "4") {
t.Fatalf("statement evaluation failed: have %s, want %s", output, "4")
}
}
@@ -218,7 +218,7 @@ func TestInteractive(t *testing.T) {
case <-time.After(time.Second):
t.Fatalf("secondary prompt timeout")
}
- if output := string(tester.output.Bytes()); !strings.Contains(output, "4") {
+ if output := tester.output.String(); !strings.Contains(output, "4") {
t.Fatalf("statement evaluation failed: have %s, want %s", output, "4")
}
}
@@ -230,7 +230,7 @@ func TestPreload(t *testing.T) {
defer tester.Close(t)
tester.console.Evaluate("preloaded")
- if output := string(tester.output.Bytes()); !strings.Contains(output, "some-preloaded-string") {
+ if output := tester.output.String(); !strings.Contains(output, "some-preloaded-string") {
t.Fatalf("preloaded variable missing: have %s, want %s", output, "some-preloaded-string")
}
}
@@ -243,7 +243,7 @@ func TestExecute(t *testing.T) {
tester.console.Execute("exec.js")
tester.console.Evaluate("execed")
- if output := string(tester.output.Bytes()); !strings.Contains(output, "some-executed-string") {
+ if output := tester.output.String(); !strings.Contains(output, "some-executed-string") {
t.Fatalf("execed variable missing: have %s, want %s", output, "some-executed-string")
}
}
@@ -275,7 +275,7 @@ func TestPrettyPrint(t *testing.T) {
string: ` + two + `
}
`
- if output := string(tester.output.Bytes()); output != want {
+ if output := tester.output.String(); output != want {
t.Fatalf("pretty print mismatch: have %s, want %s", output, want)
}
}
@@ -287,7 +287,7 @@ func TestPrettyError(t *testing.T) {
tester.console.Evaluate("throw 'hello'")
want := jsre.ErrorColor("hello") + "\n"
- if output := string(tester.output.Bytes()); output != want {
+ if output := tester.output.String(); output != want {
t.Fatalf("pretty error mismatch: have %s, want %s", output, want)
}
}