19 lines
353 B
Go
19 lines
353 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestMain(t *testing.T) {
|
|
args := []string{"eth-dump-genblock", "testdata/genesis.json"}
|
|
blockJSON := Main(args)
|
|
expected, err := os.ReadFile("testdata/genesis_block.json")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
assert.Equal(t, string(blockJSON), string(expected))
|
|
}
|