From 07ac8aca412956ea1373c637c9594cbb7e70bf0d Mon Sep 17 00:00:00 2001 From: John Guo Date: Thu, 18 Nov 2021 20:07:24 +0800 Subject: [PATCH] fix unit testing cases for package gres/gview --- os/gres/gres_z_unit_test.go | 63 ++++++++++++++++++++++------------- os/gres/testdata/data/data.go | 2 +- os/gres/testdata/testdata.go | 2 +- os/gview/gview_buildin.go | 6 ++-- os/gview/gview_z_unit_test.go | 2 ++ util/gutil/gutil_dump.go | 36 ++++++++++---------- 6 files changed, 65 insertions(+), 46 deletions(-) diff --git a/os/gres/gres_z_unit_test.go b/os/gres/gres_z_unit_test.go index 06c61a1c6..0438013e2 100644 --- a/os/gres/gres_z_unit_test.go +++ b/os/gres/gres_z_unit_test.go @@ -7,6 +7,8 @@ package gres_test import ( + _ "github.com/gogf/gf/v2/os/gres/testdata/data" + "strings" "testing" @@ -20,22 +22,26 @@ import ( func Test_PackToGoFile(t *testing.T) { gtest.C(t, func(t *gtest.T) { - srcPath := gdebug.TestDataPath("files") - goFilePath := gdebug.TestDataPath("testdata.go") - pkgName := "testdata" - err := gres.PackToGoFile(srcPath, goFilePath, pkgName) + var ( + srcPath = gdebug.TestDataPath("files") + goFilePath = gfile.TempDir(gtime.TimestampNanoStr(), "testdata.go") + pkgName = "testdata" + err = gres.PackToGoFile(srcPath, goFilePath, pkgName) + ) t.Assert(err, nil) + _ = gfile.Remove(goFilePath) }) } func Test_Pack(t *testing.T) { gtest.C(t, func(t *gtest.T) { - srcPath := gdebug.TestDataPath("files") - data, err := gres.Pack(srcPath) + var ( + srcPath = gdebug.TestDataPath("files") + data, err = gres.Pack(srcPath) + ) t.Assert(err, nil) r := gres.New() - err = r.Add(string(data)) t.Assert(err, nil) t.Assert(r.Contains("files/"), true) @@ -44,9 +50,11 @@ func Test_Pack(t *testing.T) { func Test_PackToFile(t *testing.T) { gtest.C(t, func(t *gtest.T) { - srcPath := gdebug.TestDataPath("files") - dstPath := gfile.TempDir(gtime.TimestampNanoStr()) - err := gres.PackToFile(srcPath, dstPath) + var ( + srcPath = gdebug.TestDataPath("files") + dstPath = gfile.TempDir(gtime.TimestampNanoStr()) + err = gres.PackToFile(srcPath, dstPath) + ) t.Assert(err, nil) defer gfile.Remove(dstPath) @@ -60,33 +68,42 @@ func Test_PackToFile(t *testing.T) { func Test_PackMulti(t *testing.T) { gtest.C(t, func(t *gtest.T) { - srcPath := gdebug.TestDataPath("files") - goFilePath := gdebug.TestDataPath("data/data.go") - pkgName := "data" - array, err := gfile.ScanDir(srcPath, "*", false) + var ( + srcPath = gdebug.TestDataPath("files") + goFilePath = gfile.TempDir(gtime.TimestampNanoStr(), "data.go") + pkgName = "data" + array, err = gfile.ScanDir(srcPath, "*", false) + ) t.Assert(err, nil) err = gres.PackToGoFile(strings.Join(array, ","), goFilePath, pkgName) t.Assert(err, nil) + _ = gfile.Remove(goFilePath) }) } func Test_PackWithPrefix1(t *testing.T) { gtest.C(t, func(t *gtest.T) { - srcPath := gdebug.TestDataPath("files") - goFilePath := gfile.TempDir("testdata.go") - pkgName := "testdata" - err := gres.PackToGoFile(srcPath, goFilePath, pkgName, "www/gf-site/test") - t.Assert(err, nil) + var ( + srcPath = gdebug.TestDataPath("files") + goFilePath = gfile.TempDir(gtime.TimestampNanoStr(), "testdata.go") + pkgName = "testdata" + err = gres.PackToGoFile(srcPath, goFilePath, pkgName, "www/gf-site/test") + ) + t.AssertNil(err) + _ = gfile.Remove(goFilePath) }) } func Test_PackWithPrefix2(t *testing.T) { gtest.C(t, func(t *gtest.T) { - srcPath := gdebug.TestDataPath("files") - goFilePath := gfile.TempDir("testdata.go") - pkgName := "testdata" - err := gres.PackToGoFile(srcPath, goFilePath, pkgName, "/var/www/gf-site/test") + var ( + srcPath = gdebug.TestDataPath("files") + goFilePath = gfile.TempDir(gtime.TimestampNanoStr(), "testdata.go") + pkgName = "testdata" + err = gres.PackToGoFile(srcPath, goFilePath, pkgName, "/var/www/gf-site/test") + ) t.Assert(err, nil) + _ = gfile.Remove(goFilePath) }) } diff --git a/os/gres/testdata/data/data.go b/os/gres/testdata/data/data.go index a722d54ad..601b7f3ed 100644 --- a/os/gres/testdata/data/data.go +++ b/os/gres/testdata/data/data.go @@ -3,7 +3,7 @@ package data import "github.com/gogf/gf/v2/os/gres" func init() { - if err := gres.Add("H4sIAAAAAAAC/7RaeTiU6/9+sq8hSyohYpAxtkiyFLKMfYtSGgxxGGHsLShlSUqh0nZQpGObiCMplX3LlrQoCpF9RIR+V4T3HWPJ+X27rvjHc9/3536f7f28tyGakooD0AE6MIh1NASQf+sAPbB1xdk7OqBmfkngXV2czUypwZqOnfaHxCp0kSgt8TLDDDPDuprSGr1GFArVhNKuQpZqi2sjzdvCJHT0ysTPtxsbGhpqlYlXm4N7srLSTTIvZV7KZEnLyOU0SBlSoBEIYYdEm4typhRUAPz8aYimpbv+7IKdOQDAHgCwuDzmeXkuvhKOOMf/V2XG88rM55V9D1RTJFUGwFprChOoMpo5ZdOSXN7TYn4Nhv7J4mVtmBuMtPX0wLu6/M/MN5ov0Wy+RFN1ubfLm8+xQOX/4BmYzAvcNy9Qkrb99PLPgJlU4LKPAoDLbjdhRdIBemDn6C6F8vC0mR7e/C7l0MqfJBdk+K//SDzWAy8lgffBz7skoVeH1EZKSJlqVdds067atmauzIIHl3auBwCwLcnBMMsxjT2PSx4zhFJlin3anKWso/qNuXrHpP+bY9Iwx6TJO2a8oDr/SF7KFTsmPe2YNNyxhZh6KoSSFTsmvYrlzgTogaPUDhwKi4Ov8LZyraqysn0ZZoZDQOpybjkx3N1YdeIoqxo966w4W2+kKh8AgH9lDE6YxRj83u0Yc6v/XBJxn09e4ti73EOh93c9EUFQbyXalWR1mvhfBmtmOY0c+L2kAADbVsbp7rkYZ57kT5vnwZvXyx187Zep/ZtQPL/z2flwZp0AMFfjjry/kAAAkSX5WGb5/I4g1fThlPNVErwL6+/4R894+ZRC8a7SrTcJVHSzVF0t5RFCAIAtK6Yy3ff/SEV+Wv2iWsVCZPw9FGnn6I7C4la5FiEIqC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fet/GDX4AOkPTa4AGgLDF5KIB9Ysse2lKusMFf7oEgLG2hwQdD+FR9MkCw/WHEDbcHrE6QjxQNDLSKHSq6jsWAfhDSX4JAaW8DKGlukkNBWDhyymhwkuT7Fyp8KQQAs1RGCK4N2beDKxsnArMg/aIMGDokRBCtr/pBCQnstcMhycpB/6h8nzD+jrWDZlg1cHrSnwg+Td30xLHItG1JYaP8EDksnBFbenln5wewJgYVsLNQ0P/9AGSiDADYACD/fV8D/BQAA///hNf5RQzcAAA=="); err != nil { panic("add binary content to resource manager failed: " + err.Error()) } } diff --git a/os/gres/testdata/testdata.go b/os/gres/testdata/testdata.go index 382cc18a8..c391ce058 100644 --- a/os/gres/testdata/testdata.go +++ b/os/gres/testdata/testdata.go @@ -3,7 +3,7 @@ package testdata import "github.com/gogf/gf/v2/os/gres" func init() { - if err := gres.Add("H4sIAAAAAAAC/7SaCTTU6xvH3+xZQpYUIWKQMQyRZCnKMpaxRimNNWKEka0FpSxJKRRtF0W61ogkXZV935KUohDZR0Tof8rF/MaMJt1/59TUyfk83/f7Pu9veeaLRlHTcAIGAMAVt5toQPCLGawG9o7Odh4IG1esvaODqQktWNX6JuUgGkXPQPiD5BEcRAi4jacHztXllyQGMGLnCCEJkCb9+y8pnKuL809q93b7gxKVunCElmQ5OsMU3VBbVqvXjEAgWhDa1fAybUltuFlnqJSOXrnkhS4jNBqtVS5ZYwbuyckhW2TrZOtks5Gy8rlNMoZUKBhM1CHR+pK8KRUNAN+//9BqoiHfZgYAsF9W6wYyWl18pByxjv+pTONFmXsXZUrTd535tUweIpn/Ny/RiyJNFkVef3bR9tciiTvo/2Gi0aI+s0V9XwPUlYj1Le1wxgV9to7uMis4ImsgAISHp/UKTgffEsiP33CcnQdORgrnjVu0S0qvAa4Nl5Ix0aqp3aJdvWXVwnoLH1zevg4AwL5sJTZopZ8VFumkycHUqrMcAAAWyp1E/qmTyP/CSSTESSRpJ42WrNcvgp/6N51E/nQSCXVyKVlPNav0d5x0lNmGpcBJ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pDJTxFTCpBKUuo8RUJyJonzZdSSpkMwTVCBhtogfIpCXCVCaeSKGEqaBoNCn5KBLQ0rLLZoVsmgbZrBMrAgqjTBlsQ4iLXkpZUmMg5hGGOKB0rhYwC9zQ8Q0wmQON4R2mQSNKAZEDCPM2UAfyVjWAEqiPcRAwhzMegjwHGkgUVhnuZ1YC+Eps4LlsjTEIML4ChR0BwoiDsssUUSQSIGCBNjActkXYhBh8IMLAoqGgkjEWShn0bGDXyRVKH/48F5gEYVQKH04y4MAiEIo0BURhkGgz/YzSyAkQijLaWKDaApcC5bLkxDd7ghmq9D2LiOBWZonIeYRzjSh+1YmAH4xn6Xc9tuCgPxMFCqIcFgJXWDXEsjviuKGiDLfBH498ISKI5w0ikDPMFkYuYHnkldegtmhEIS9TQj8zuRyyW2OYAwIBT8jDyY1VCIGEw7doGC0MPidmSLle6a0Gfx6ggdVSThfg6oMIQujyFfCURoUPE4eTImvhFMxKNhOBPzOXG45X3khvo6SBxON2KBSCadfohCpGqLgd0dsxHDCSRcUnkMBHEneC1LDsnkvvu8UhYElozNauh//qwpUwRYOAGx+PPqA/wUAAP//sdDZV6M6AAA="); err != nil { panic("add binary content to resource manager failed: " + err.Error()) } } diff --git a/os/gview/gview_buildin.go b/os/gview/gview_buildin.go index c0d645cf6..82ee14641 100644 --- a/os/gview/gview_buildin.go +++ b/os/gview/gview_buildin.go @@ -23,15 +23,15 @@ import ( ) // buildInFuncDump implements build-in template function: dump -func (view *View) buildInFuncDump(values ...interface{}) (result string) { +func (view *View) buildInFuncDump(values ...interface{}) string { buffer := bytes.NewBuffer(nil) buffer.WriteString("\n") - return result + return buffer.String() } // buildInFuncMap implements build-in template function: map diff --git a/os/gview/gview_z_unit_test.go b/os/gview/gview_z_unit_test.go index 6311f7ad7..c055d3fde 100644 --- a/os/gview/gview_z_unit_test.go +++ b/os/gview/gview_z_unit_test.go @@ -8,6 +8,7 @@ package gview_test import ( "context" + "fmt" "io/ioutil" "os" "strings" @@ -411,6 +412,7 @@ func Test_BuildInFuncDump(t *testing.T) { }) r, err := v.ParseContent(context.TODO(), "{{dump .}}") t.Assert(err, nil) + fmt.Println(r) t.Assert(gstr.Contains(r, `"name": "john"`), true) t.Assert(gstr.Contains(r, `"score": 100`), true) }) diff --git a/util/gutil/gutil_dump.go b/util/gutil/gutil_dump.go index 1d985999d..2e67c4ac6 100644 --- a/util/gutil/gutil_dump.go +++ b/util/gutil/gutil_dump.go @@ -29,14 +29,14 @@ type iMarshalJSON interface { // DumpOption specifies the behavior of function Export. type DumpOption struct { - WithoutType bool // WithoutType specifies exported content has no type information. + WithType bool // WithType specifies dumping content with type information. } // Dump prints variables `values` to stdout with more manually readable. func Dump(values ...interface{}) { for _, value := range values { DumpWithOption(value, DumpOption{ - WithoutType: true, + WithType: false, }) } } @@ -46,7 +46,7 @@ func Dump(values ...interface{}) { func DumpWithType(values ...interface{}) { for _, value := range values { DumpWithOption(value, DumpOption{ - WithoutType: false, + WithType: true, }) } } @@ -55,7 +55,7 @@ func DumpWithType(values ...interface{}) { func DumpWithOption(value interface{}, option DumpOption) { buffer := bytes.NewBuffer(nil) DumpTo(buffer, value, DumpOption{ - WithoutType: option.WithoutType, + WithType: option.WithType, }) fmt.Println(buffer.String()) } @@ -64,13 +64,13 @@ func DumpWithOption(value interface{}, option DumpOption) { func DumpTo(writer io.Writer, value interface{}, option DumpOption) { buffer := bytes.NewBuffer(nil) doDump(value, "", buffer, doDumpOption{ - WithoutType: option.WithoutType, + WithType: option.WithType, }) _, _ = writer.Write(buffer.Bytes()) } type doDumpOption struct { - WithoutType bool + WithType bool } func doDump(value interface{}, indent string, buffer *bytes.Buffer, option doDumpOption) { @@ -85,7 +85,7 @@ func doDump(value interface{}, indent string, buffer *bytes.Buffer, option doDum newIndent = indent + dumpIndent ) reflectTypeName = strings.ReplaceAll(reflectTypeName, `[]uint8`, `[]byte`) - if option.WithoutType { + if !option.WithType { reflectTypeName = "" } for reflectKind == reflect.Ptr { @@ -163,7 +163,7 @@ type doDumpInternalInput struct { func doDumpSlice(in doDumpInternalInput) { if b, ok := in.Value.([]byte); ok { - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString(fmt.Sprintf(`"%s"`, addSlashesForString(string(b)))) } else { in.Buffer.WriteString(fmt.Sprintf( @@ -176,14 +176,14 @@ func doDumpSlice(in doDumpInternalInput) { return } if in.ReflectValue.Len() == 0 { - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString("[]") } else { in.Buffer.WriteString(fmt.Sprintf("%s(0) []", in.ReflectTypeName)) } return } - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString("[\n") } else { in.Buffer.WriteString(fmt.Sprintf("%s(%d) [\n", in.ReflectTypeName, in.ReflectValue.Len())) @@ -201,7 +201,7 @@ func doDumpMap(in doDumpInternalInput) { mapKeys = in.ReflectValue.MapKeys() ) if len(mapKeys) == 0 { - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString("{}") } else { in.Buffer.WriteString(fmt.Sprintf("%s(0) {}", in.ReflectTypeName)) @@ -219,7 +219,7 @@ func doDumpMap(in doDumpInternalInput) { maxSpaceNum = tmpSpaceNum } } - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString("{\n") } else { in.Buffer.WriteString(fmt.Sprintf("%s(%d) {\n", in.ReflectTypeName, len(mapKeys))) @@ -231,7 +231,7 @@ func doDumpMap(in doDumpInternalInput) { } else { mapKeyStr = fmt.Sprintf(`%v`, mapKey.Interface()) } - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString(fmt.Sprintf( "%s%v:%s", in.NewIndent, @@ -275,7 +275,7 @@ func doDumpStruct(in doDumpInternalInput) { structContentStr = fmt.Sprintf(`"%s"`, addSlashesForString(structContentStr)) attributeCountStr = fmt.Sprintf(`%d`, len(structContentStr)-2) } - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString(structContentStr) } else { in.Buffer.WriteString(fmt.Sprintf( @@ -297,7 +297,7 @@ func doDumpStruct(in doDumpInternalInput) { maxSpaceNum = tmpSpaceNum } } - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString("{\n") } else { in.Buffer.WriteString(fmt.Sprintf("%s(%d) {\n", in.ReflectTypeName, len(structFields))) @@ -319,7 +319,7 @@ func doDumpStruct(in doDumpInternalInput) { func doDumpNumber(in doDumpInternalInput) { if v, ok := in.Value.(iString); ok { s := v.String() - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString(fmt.Sprintf(`"%v"`, addSlashesForString(s))) } else { in.Buffer.WriteString(fmt.Sprintf( @@ -336,7 +336,7 @@ func doDumpNumber(in doDumpInternalInput) { func doDumpString(in doDumpInternalInput) { s := in.ReflectValue.String() - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString(fmt.Sprintf(`"%v"`, addSlashesForString(s))) } else { in.Buffer.WriteString(fmt.Sprintf( @@ -351,7 +351,7 @@ func doDumpString(in doDumpInternalInput) { func doDumpDefault(in doDumpInternalInput) { s := fmt.Sprintf("%v", in.Value) s = gstr.Trim(s, `<>`) - if in.Option.WithoutType { + if !in.Option.WithType { in.Buffer.WriteString(s) } else { in.Buffer.WriteString(fmt.Sprintf("%s(%s)", in.ReflectTypeName, s))