gf/os/gbuild/gbuild_z_unit_test.go
2022-02-23 12:03:21 +08:00

44 lines
950 B
Go

// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package gbuild_test
import (
"testing"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gbuild"
"github.com/gogf/gf/v2/test/gtest"
"github.com/gogf/gf/v2/util/gconv"
)
func Test_Info(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
t.Assert(gconv.Map(gbuild.Info()), g.Map{
"GoFrame": "",
"Golang": "",
"Git": "",
"Time": "",
"Data": g.Map{},
})
})
}
func Test_Get(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
t.Assert(gbuild.Get(`none`), nil)
})
gtest.C(t, func(t *gtest.T) {
t.Assert(gbuild.Get(`none`, 1), 1)
})
}
func Test_Map(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
t.Assert(gbuild.Data(), map[string]interface{}{})
})
}