Commit 3ec5d194 authored by protolambda's avatar protolambda

cannon: add newline to hello world

parent 2fe7e560
...@@ -3,5 +3,5 @@ package main ...@@ -3,5 +3,5 @@ package main
import "os" import "os"
func main() { func main() {
_, _ = os.Stdout.Write([]byte("hello world!")) _, _ = os.Stdout.Write([]byte("hello world!\n"))
} }
...@@ -184,7 +184,7 @@ func TestHelloEVM(t *testing.T) { ...@@ -184,7 +184,7 @@ func TestHelloEVM(t *testing.T) {
require.True(t, state.Exited, "must complete program") require.True(t, state.Exited, "must complete program")
require.Equal(t, uint8(0), state.ExitCode, "exit with 0") require.Equal(t, uint8(0), state.ExitCode, "exit with 0")
require.Equal(t, "hello world!", stdOutBuf.String(), "stdout says hello") require.Equal(t, "hello world!\n", stdOutBuf.String(), "stdout says hello")
require.Equal(t, "", stdErrBuf.String(), "stderr silent") require.Equal(t, "", stdErrBuf.String(), "stderr silent")
} }
......
...@@ -93,7 +93,7 @@ func TestHello(t *testing.T) { ...@@ -93,7 +93,7 @@ func TestHello(t *testing.T) {
require.True(t, state.Exited, "must complete program") require.True(t, state.Exited, "must complete program")
require.Equal(t, uint8(0), state.ExitCode, "exit with 0") require.Equal(t, uint8(0), state.ExitCode, "exit with 0")
require.Equal(t, "hello world!", stdOutBuf.String(), "stdout says hello") require.Equal(t, "hello world!\n", stdOutBuf.String(), "stdout says hello")
require.Equal(t, "", stdErrBuf.String(), "stderr silent") require.Equal(t, "", stdErrBuf.String(), "stderr silent")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment