mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 05:25:14 +08:00
feat: prepare experiment push package
This commit is contained in:
@@ -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());
|
||||
}
|
||||
Reference in New Issue
Block a user