diff --git a/dar2oar_core/src/fs/mapping_table.rs b/dar2oar_core/src/fs/mapping_table.rs index 6ca75b6..10b4ff3 100644 --- a/dar2oar_core/src/fs/mapping_table.rs +++ b/dar2oar_core/src/fs/mapping_table.rs @@ -15,7 +15,7 @@ pub fn read_mapping_table(table_path: impl AsRef) -> anyhow::Result HashMap { +fn parse_mapping_table(table: &str) -> HashMap { let mut map = HashMap::new(); // Sequential numbering of duplicate keys when no key is available. diff --git a/dar2oar_core/src/fs/mod.rs b/dar2oar_core/src/fs/mod.rs index ee6a23d..5a3c2de 100644 --- a/dar2oar_core/src/fs/mod.rs +++ b/dar2oar_core/src/fs/mod.rs @@ -64,33 +64,3 @@ where config_file.write_all(json.as_bytes())?; Ok(()) } - -#[cfg(test)] -mod test { - use super::*; - - #[ignore] - #[test] - fn should_parallel_traverse() -> anyhow::Result<()> { - let config = simple_log::LogConfigBuilder::builder() - .path("../convert.log") - .size(100) - .roll_count(10) - .level("error") - .output_file() - .output_console() - .build(); - simple_log::new(config).unwrap(); - - let table_content = "../test/settings/mapping_table.txt"; - let mapping = read_mapping_table(table_content)?; - convert_dar_to_oar( - "../test/data/Modern Female Sitting Animations Overhaul", - None, - None, - None, - Some(mapping), - None, - ) - } -} diff --git a/dar2oar_core/src/fs/sequential/mod.rs b/dar2oar_core/src/fs/sequential/mod.rs index a78c8a0..456a220 100644 --- a/dar2oar_core/src/fs/sequential/mod.rs +++ b/dar2oar_core/src/fs/sequential/mod.rs @@ -133,9 +133,10 @@ mod test { .build(); simple_log::new(config).unwrap(); - let table = crate::fs::mapping_table::parse_mapping_table(include_str!( - "../../../../test/settings/UnderDog Animations_mapping_table.txt" - )); + // cannot use include_str! + let table = + crate::read_mapping_table("../test/settings/UnderDog Animations_mapping_table.txt") + .unwrap(); convert_dar_to_oar( "../test/data/UNDERDOG Animations", None,