-
Notifications
You must be signed in to change notification settings - Fork 8
/
file_test.go
57 lines (47 loc) · 898 Bytes
/
file_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package wz
import (
"fmt"
"testing"
)
/*
func TestWZEtcWZ(t *testing.T) {
return
fmt.Println("test")
base, err := NewFile("Etc.wz")
if err != nil {
panic(err)
}
base.Debug = true
base.SetWZVariant(VariantGMS)
base.Parse()
}
*/
func parseDir(dir *WZDirectory) {
fmt.Println("Found dir: ", dir.GetPath())
for _, subnode := range dir.Directories {
parseDir(subnode)
}
for name, node := range dir.Images {
fmt.Println("Found image: ", name, ":", node.GetPath())
//subnode.Parse()
}
}
func TestWZDataWZ(t *testing.T) {
fmt.Println("test")
base, err := NewFile("Data.wz")
if err != nil {
panic(err)
}
//base.Debug = true
base.Parse()
base.WaitUntilLoaded()
/*
for _, node := range base.Root.Directories {
parseDir(node)
}
for name, node := range base.Root.Images {
fmt.Println("Found image: ", name, ":", node.GetPath())
//node.Parse()
}
*/
}