diff --git a/gno.land/pkg/gnoclient/integration_test.go b/gno.land/pkg/gnoclient/integration_test.go index 985ec0f8d53..bd8079517d8 100644 --- a/gno.land/pkg/gnoclient/integration_test.go +++ b/gno.land/pkg/gnoclient/integration_test.go @@ -54,7 +54,7 @@ func TestCallSingle_Integration(t *testing.T) { // Execute call res, err := client.Call(baseCfg, msg) - expected := "(\"hi test argument\" string)" + expected := "(\"hi test argument\" string)\n\n" got := string(res.DeliverTx.Data) assert.Nil(t, err) @@ -103,7 +103,7 @@ func TestCallMultiple_Integration(t *testing.T) { Send: "", } - expected := "(\"it works!\" string)(\"hi test argument\" string)" + expected := "(\"it works!\" string)\n\n(\"hi test argument\" string)\n\n" // Execute call res, err := client.Call(baseCfg, msg1, msg2) diff --git a/gno.land/pkg/sdk/vm/keeper.go b/gno.land/pkg/sdk/vm/keeper.go index e7757235020..ef260bd3c42 100644 --- a/gno.land/pkg/sdk/vm/keeper.go +++ b/gno.land/pkg/sdk/vm/keeper.go @@ -315,6 +315,7 @@ func (vm *VMKeeper) Call(ctx sdk.Context, msg MsgCall) (res string, err error) { res += "\n" } } + res += "\n\n" // use `\n\n` as separator to separate results for single tx with multi msgs return res, nil // TODO pay for gas? TODO see context? } diff --git a/gno.land/pkg/sdk/vm/keeper_test.go b/gno.land/pkg/sdk/vm/keeper_test.go index 9d74a855a61..bd6f7ad88d1 100644 --- a/gno.land/pkg/sdk/vm/keeper_test.go +++ b/gno.land/pkg/sdk/vm/keeper_test.go @@ -92,7 +92,7 @@ func Echo(msg string) string { msg2 := NewMsgCall(addr, coins, pkgPath, "Echo", []string{"hello world"}) res, err := env.vmk.Call(ctx, msg2) assert.NoError(t, err) - assert.Equal(t, `("echo:hello world" string)`, res) + assert.Equal(t, `("echo:hello world" string)`+"\n\n", res) // t.Log("result:", res) } @@ -235,7 +235,7 @@ func Echo(msg string) string { msg2 := NewMsgCall(addr, coins, pkgPath, "Echo", []string{"hello world"}) res, err := env.vmk.Call(ctx, msg2) assert.NoError(t, err) - assert.Equal(t, `("echo:hello world" string)`, res) + assert.Equal(t, `("echo:hello world" string)`+"\n\n", res) } // Sending too much realm package coins fails. @@ -331,7 +331,7 @@ func GetAdmin() string { coins := std.MustParseCoins("") msg2 := NewMsgCall(addr, coins, pkgPath, "GetAdmin", []string{}) res, err := env.vmk.Call(ctx, msg2) - addrString := fmt.Sprintf("(\"%s\" string)", addr.String()) + addrString := fmt.Sprintf("(\"%s\" string)\n\n", addr.String()) assert.NoError(t, err) assert.Equal(t, addrString, res) }