update playworks checker
This commit is contained in:
32
standalone/playworks_export_test.go
Normal file
32
standalone/playworks_export_test.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestExportPlayworksNetworksForRuntimeCheck(t *testing.T) {
|
||||
outDir := os.Getenv("PLAYWORKS_EXPORT_DIR")
|
||||
if outDir == "" {
|
||||
t.Skip("PLAYWORKS_EXPORT_DIR not set")
|
||||
}
|
||||
|
||||
sourcePath := filepath.Join("..", "aiAssets", "Playworks_UnityNetwork.html")
|
||||
data, err := os.ReadFile(sourcePath)
|
||||
if err != nil {
|
||||
t.Fatalf("read source: %v", err)
|
||||
}
|
||||
|
||||
opts := playworksConvertOptions{
|
||||
SourcePath: sourcePath,
|
||||
OutputDir: outDir,
|
||||
BaseName: "wat_mip_grhpl_dogcat3_05_real_na_noseason_en_full_na",
|
||||
}
|
||||
|
||||
for _, network := range []string{"al", "fb", "gg", "is", "mo", "mtg", "un", "vu"} {
|
||||
if _, err := convertPlayworksNetwork(string(data), opts, network); err != nil {
|
||||
t.Fatalf("convert %s: %v", network, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user