Test org_mode_samples both with and without alphabetical lists enabled.

This commit is contained in:
Tom Alexander
2023-09-29 15:30:38 -04:00
parent f1261ddce8
commit 2012e5a6d5
7 changed files with 109 additions and 23 deletions

View File

@@ -1,7 +1,22 @@
{expect_fail}
#[test]
fn {name}() -> Result<(), Box<dyn std::error::Error>> {{
fn autogen_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
organic::compare::run_anonymous_compare(org_contents.as_str())?;
Ok(())
}}
{expect_fail}
#[test]
fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{
let org_path = "{path}";
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
let global_settings = {{
let mut global_settings = organic::GlobalSettings::default();
global_settings.list_allow_alphabetical = true;
global_settings
}};
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
Ok(())
}}