cmd/evm: add tests for evm t8n (#23507)

This commit is contained in:
Martin Holst Swende
2021-09-02 09:22:43 +02:00
committed by GitHub
parent 067084feda
commit 4d88974864
17 changed files with 424 additions and 31 deletions

View File

@ -118,6 +118,13 @@ func (tt *TestCmd) Expect(tplsource string) {
tt.Logf("Matched stdout text:\n%s", want)
}
// Output reads all output from stdout, and returns the data.
func (tt *TestCmd) Output() []byte {
var buf []byte
tt.withKillTimeout(func() { buf, _ = io.ReadAll(tt.stdout) })
return buf
}
func (tt *TestCmd) matchExactOutput(want []byte) error {
buf := make([]byte, len(want))
n := 0