test gorush version.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
87320ed011
commit
349099fcf6
|
@ -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.`,
|
||||
|
|
Loading…
Reference in New Issue