package app_test

import (
	"testing"

	"git.marketally.com/tutus-one/tutus-chain/internal/testcli"
	"git.marketally.com/tutus-one/tutus-chain/internal/versionutil"
	"git.marketally.com/tutus-one/tutus-chain/pkg/config"
)

func TestCLIVersion(t *testing.T) {
	config.Version = versionutil.TestVersion // Zero-length version string disables '--version' completely.
	e := testcli.NewExecutor(t, false)
	e.Run(t, "tutus", "--version")
	e.CheckNextLine(t, "^Tutus")
	e.CheckNextLine(t, "^Version:")
	e.CheckNextLine(t, "^GoVersion:")
	e.CheckEOF(t)
}
