From 1c7d64bffc2dc023b8e3baf9563bd214a130fd91 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 23 Jan 2025 19:40:37 -0800 Subject: [PATCH] rust: Update some test paths --- rust/src/unity/asset_file.rs | 2 +- rust/src/wow/db.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rust/src/unity/asset_file.rs b/rust/src/unity/asset_file.rs index 400ea859d..b27afa005 100644 --- a/rust/src/unity/asset_file.rs +++ b/rust/src/unity/asset_file.rs @@ -116,7 +116,7 @@ mod tests { #[test] fn test() { - let base_path = PathBuf::from_str("C:\\Users\\ifnsp\\dev\\noclip.website\\data\\AShortHike").unwrap(); + let base_path = PathBuf::from_str("../data/AShortHike").unwrap(); let data = std::fs::read(&base_path.join("resources.assets")).unwrap(); let version = UnityVersion::V2021_3_27f1; let mut asset_file = AssetFile::initialize_with_header_chunk(&data).unwrap(); diff --git a/rust/src/wow/db.rs b/rust/src/wow/db.rs index cf636aa55..04c448c4b 100644 --- a/rust/src/wow/db.rs +++ b/rust/src/wow/db.rs @@ -969,8 +969,9 @@ mod test { #[test] fn test_liquid_type() { - let d5 = std::fs::read("../data/wotlk/dbfilesclient/liquidtype.db2").unwrap(); - let db: DatabaseTable = DatabaseTable::new(&d5).unwrap(); + let sheep_path = "../data/WorldOfWarcraft/sheep0"; + let d4 = SheepfileManager::load_file_id_data(sheep_path, 1371380).unwrap(); // liquidTypes + let db: DatabaseTable = DatabaseTable::new(&d4).unwrap(); dbg!(&db.get_record(20).unwrap().name); dbg!(&db.get_record(21).unwrap().name); dbg!(&db.get_record(22)); @@ -979,7 +980,8 @@ mod test { #[test] fn test_skybox() { - let d5 = std::fs::read("../data/wotlk/dbfilesclient/lightskybox.db2").unwrap(); + let sheep_path = "../data/WorldOfWarcraft/sheep0"; + let d5 = SheepfileManager::load_file_id_data(sheep_path, 1308501).unwrap(); // lightSkyboxData let db: DatabaseTable = DatabaseTable::new(&d5).unwrap(); dbg!(&db.records[0..4]); }