feat: prepare experiment push package

This commit is contained in:
2026-06-30 00:08:36 +08:00
parent 3c00659691
commit adc1cd5b91
45 changed files with 7858 additions and 65 deletions
+24
View File
@@ -0,0 +1,24 @@
use bat_adapters::unity::{RawAssetBundle, Unity2021_3Adapter, UnityAdapter};
use std::path::PathBuf;
#[tokio::test]
#[ignore = "requires BAT_REAL_UNITYFS_BUNDLE pointing at a local UnityFS bundle"]
async fn parses_local_real_unityfs_bundle() {
let path = PathBuf::from(
std::env::var("BAT_REAL_UNITYFS_BUNDLE").expect("BAT_REAL_UNITYFS_BUNDLE must be set"),
);
let data = std::fs::read(&path).expect("read local UnityFS bundle");
let adapter = Unity2021_3Adapter::new();
let parsed = adapter
.parse(&RawAssetBundle {
data,
path: Some(path.display().to_string()),
})
.await
.expect("parse local UnityFS bundle");
assert_eq!(parsed.unity_version, "2021.3.56f2");
assert!(!parsed.blocks.is_empty());
assert!(!parsed.directories.is_empty());
}