2022-10-05 06:44:10 +00:00
|
|
|
package app_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/nspcc-dev/neo-go/internal/testcli"
|
2023-08-29 17:39:27 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/internal/versionutil"
|
2022-10-05 06:44:10 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/config"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCLIVersion(t *testing.T) {
|
2023-08-29 17:39:27 +00:00
|
|
|
config.Version = versionutil.TestVersion // Zero-length version string disables '--version' completely.
|
2022-10-05 06:44:10 +00:00
|
|
|
e := testcli.NewExecutor(t, false)
|
|
|
|
e.Run(t, "neo-go", "--version")
|
|
|
|
e.CheckNextLine(t, "^NeoGo")
|
|
|
|
e.CheckNextLine(t, "^Version:")
|
|
|
|
e.CheckNextLine(t, "^GoVersion:")
|
|
|
|
e.CheckEOF(t)
|
|
|
|
}
|