Add tests for tab width.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// TODO: Investigate writing a proc macro to make specifying these permutations easier.
|
||||
|
||||
{expect_fail}
|
||||
#[test]
|
||||
fn autogen_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||
@@ -20,3 +22,31 @@ fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
|
||||
Ok(())
|
||||
}}
|
||||
|
||||
{expect_fail}
|
||||
#[test]
|
||||
fn autogen_t1_{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.tab_width = 1;
|
||||
global_settings
|
||||
}};
|
||||
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
|
||||
Ok(())
|
||||
}}
|
||||
|
||||
{expect_fail}
|
||||
#[test]
|
||||
fn autogen_t16_{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.tab_width = 16;
|
||||
global_settings
|
||||
}};
|
||||
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
|
||||
Ok(())
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user