@@ -21,7 +21,11 @@ func initTest() {
|
||||
}
|
||||
|
||||
func TestPrintGoRushVersion(t *testing.T) {
|
||||
SetVersion("3.0.0")
|
||||
ver := GetVersion()
|
||||
PrintGoRushVersion()
|
||||
|
||||
assert.Equal(t, "3.0.0", ver)
|
||||
}
|
||||
|
||||
func TestRunNormalServer(t *testing.T) {
|
||||
|
||||
@@ -12,6 +12,10 @@ func SetVersion(ver string) {
|
||||
version = ver
|
||||
}
|
||||
|
||||
func GetVersion() string {
|
||||
return version
|
||||
}
|
||||
|
||||
// PrintGoRushVersion provide print server engine
|
||||
func PrintGoRushVersion() {
|
||||
fmt.Printf(`GoRush %s, Compiler: %s %s, Copyright (C) 2016 Bo-Yi Wu, Inc.`,
|
||||
|
||||
Reference in New Issue
Block a user