@@ -10,7 +10,6 @@ import (
10
10
"bytes"
11
11
"testing"
12
12
13
- "github.com/gogf/gf/v2/debug/gdebug"
14
13
"github.com/gogf/gf/v2/encoding/gcompress"
15
14
"github.com/gogf/gf/v2/os/gfile"
16
15
"github.com/gogf/gf/v2/os/gtime"
@@ -20,8 +19,8 @@ import (
20
19
func Test_ZipPath (t * testing.T ) {
21
20
// file
22
21
gtest .C (t , func (t * gtest.T ) {
23
- srcPath := gdebug . TestDataPath ("zip" , "path1" , "1.txt" )
24
- dstPath := gdebug . TestDataPath ("zip" , "zip.zip" )
22
+ srcPath := gtest . DataPath ("zip" , "path1" , "1.txt" )
23
+ dstPath := gtest . DataPath ("zip" , "zip.zip" )
25
24
26
25
t .Assert (gfile .Exists (dstPath ), false )
27
26
t .Assert (gcompress .ZipPath (srcPath , dstPath ), nil )
@@ -42,8 +41,8 @@ func Test_ZipPath(t *testing.T) {
42
41
// multiple files
43
42
gtest .C (t , func (t * gtest.T ) {
44
43
var (
45
- srcPath1 = gdebug . TestDataPath ("zip" , "path1" , "1.txt" )
46
- srcPath2 = gdebug . TestDataPath ("zip" , "path2" , "2.txt" )
44
+ srcPath1 = gtest . DataPath ("zip" , "path1" , "1.txt" )
45
+ srcPath2 = gtest . DataPath ("zip" , "path2" , "2.txt" )
47
46
dstPath = gfile .Temp (gtime .TimestampNanoStr (), "zip.zip" )
48
47
)
49
48
if p := gfile .Dir (dstPath ); ! gfile .Exists (p ) {
@@ -75,8 +74,8 @@ func Test_ZipPath(t *testing.T) {
75
74
// one dir and one file.
76
75
gtest .C (t , func (t * gtest.T ) {
77
76
var (
78
- srcPath1 = gdebug . TestDataPath ("zip" , "path1" )
79
- srcPath2 = gdebug . TestDataPath ("zip" , "path2" , "2.txt" )
77
+ srcPath1 = gtest . DataPath ("zip" , "path1" )
78
+ srcPath2 = gtest . DataPath ("zip" , "path2" , "2.txt" )
80
79
dstPath = gfile .Temp (gtime .TimestampNanoStr (), "zip.zip" )
81
80
)
82
81
if p := gfile .Dir (dstPath ); ! gfile .Exists (p ) {
@@ -107,8 +106,8 @@ func Test_ZipPath(t *testing.T) {
107
106
})
108
107
// directory.
109
108
gtest .C (t , func (t * gtest.T ) {
110
- srcPath := gdebug . TestDataPath ("zip" )
111
- dstPath := gdebug . TestDataPath ("zip" , "zip.zip" )
109
+ srcPath := gtest . DataPath ("zip" )
110
+ dstPath := gtest . DataPath ("zip" , "zip.zip" )
112
111
113
112
pwd := gfile .Pwd ()
114
113
err := gfile .Chdir (srcPath )
@@ -141,10 +140,10 @@ func Test_ZipPath(t *testing.T) {
141
140
// multiple directory paths joined using char ','.
142
141
gtest .C (t , func (t * gtest.T ) {
143
142
var (
144
- srcPath = gdebug . TestDataPath ("zip" )
145
- srcPath1 = gdebug . TestDataPath ("zip" , "path1" )
146
- srcPath2 = gdebug . TestDataPath ("zip" , "path2" )
147
- dstPath = gdebug . TestDataPath ("zip" , "zip.zip" )
143
+ srcPath = gtest . DataPath ("zip" )
144
+ srcPath1 = gtest . DataPath ("zip" , "path1" )
145
+ srcPath2 = gtest . DataPath ("zip" , "path2" )
146
+ dstPath = gtest . DataPath ("zip" , "zip.zip" )
148
147
)
149
148
pwd := gfile .Pwd ()
150
149
err := gfile .Chdir (srcPath )
@@ -181,9 +180,9 @@ func Test_ZipPath(t *testing.T) {
181
180
func Test_ZipPathWriter (t * testing.T ) {
182
181
gtest .C (t , func (t * gtest.T ) {
183
182
var (
184
- srcPath = gdebug . TestDataPath ("zip" )
185
- srcPath1 = gdebug . TestDataPath ("zip" , "path1" )
186
- srcPath2 = gdebug . TestDataPath ("zip" , "path2" )
183
+ srcPath = gtest . DataPath ("zip" )
184
+ srcPath1 = gtest . DataPath ("zip" , "path1" )
185
+ srcPath2 = gtest . DataPath ("zip" , "path2" )
187
186
)
188
187
pwd := gfile .Pwd ()
189
188
err := gfile .Chdir (srcPath )
0 commit comments