@@ -63,6 +63,19 @@ func Test_Pack(t *testing.T) {
63
63
t .AssertNil (err )
64
64
t .Assert (r .Contains ("files/" ), true )
65
65
})
66
+
67
+ gtest .C (t , func (t * gtest.T ) {
68
+ var (
69
+ srcPath = gtest .DataPath ("files" )
70
+ data , err = gres .Pack (srcPath , "/" )
71
+ )
72
+ t .AssertNil (err )
73
+
74
+ r := gres .New ()
75
+ err = r .Add (string (data ))
76
+ t .AssertNil (err )
77
+ t .Assert (r .Contains ("/root/" ), true )
78
+ })
66
79
}
67
80
68
81
func Test_PackToFile (t * testing.T ) {
@@ -121,7 +134,7 @@ func Test_Unpack(t *testing.T) {
121
134
}
122
135
123
136
func Test_Basic (t * testing.T ) {
124
- gres .Dump ()
137
+ // gres.Dump()
125
138
gtest .C (t , func (t * gtest.T ) {
126
139
t .Assert (gres .Get ("none" ), nil )
127
140
t .Assert (gres .Contains ("none" ), false )
@@ -180,7 +193,7 @@ func Test_Basic(t *testing.T) {
180
193
}
181
194
182
195
func Test_Get (t * testing.T ) {
183
- gres .Dump ()
196
+ // gres.Dump()
184
197
gtest .C (t , func (t * gtest.T ) {
185
198
t .AssertNE (gres .Get ("dir1/test1" ), nil )
186
199
})
@@ -196,7 +209,7 @@ func Test_Get(t *testing.T) {
196
209
}
197
210
198
211
func Test_ScanDir (t * testing.T ) {
199
- gres .Dump ()
212
+ // gres.Dump()
200
213
gtest .C (t , func (t * gtest.T ) {
201
214
path := "dir1"
202
215
files := gres .ScanDir (path , "*" , false )
@@ -221,7 +234,7 @@ func Test_ScanDir(t *testing.T) {
221
234
}
222
235
223
236
func Test_ScanDirFile (t * testing.T ) {
224
- gres .Dump ()
237
+ // gres.Dump()
225
238
gtest .C (t , func (t * gtest.T ) {
226
239
path := "dir2"
227
240
files := gres .ScanDirFile (path , "*" , false )
@@ -246,7 +259,7 @@ func Test_ScanDirFile(t *testing.T) {
246
259
}
247
260
248
261
func Test_Export (t * testing.T ) {
249
- gres .Dump ()
262
+ // gres.Dump()
250
263
gtest .C (t , func (t * gtest.T ) {
251
264
var (
252
265
src = `template-res`
@@ -312,7 +325,7 @@ func TestFile_Name(t *testing.T) {
312
325
}
313
326
314
327
func TestFile_Export (t * testing.T ) {
315
- gres .Dump ()
328
+ // gres.Dump()
316
329
gtest .C (t , func (t * gtest.T ) {
317
330
var (
318
331
src = `template-res`
0 commit comments