From 8561fdc1bdf4ecc3dbbff81dcd25361d03c6947a Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 21 Aug 2023 00:14:10 -0400 Subject: [PATCH] Make the autogen prefix fully integrated into the test name. --- build.rs | 13 +++++++------ tests/test_template | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.rs b/build.rs index 8cc10a0..0dba36e 100644 --- a/build.rs +++ b/build.rs @@ -41,6 +41,7 @@ fn write_test(test_file: &mut File, test: &walkdir::DirEntry) { .strip_suffix(".org") .expect("Should have .org extension") .replace("/", "_"); + let test_name = format!("autogen_{}", test_name); if let Some(_reason) = is_expect_fail(test_name.as_str()) { write!(test_file, "#[ignore]\n").unwrap(); @@ -71,12 +72,12 @@ use organic::parser::sexp::sexp_with_padding; fn is_expect_fail(name: &str) -> Option<&str> { match name { - "greater_element_drawer_drawer_with_headline_inside" => Some("Apparently lines with :end: become their own paragraph. This odd behavior needs to be investigated more."), - "element_container_priority_footnote_definition_dynamic_block" => Some("Apparently broken begin lines become their own paragraph."), - "lesser_element_paragraphs_paragraph_with_backslash_line_breaks" => Some("The text we're getting out of the parse tree is already processed to remove line breaks, so our comparison needs to take that into account."), - "greater_element_plain_list_trailing_whitespace_ownership_test_case_1" => Some("Seeing odd behavior about whitespace ownership."), // https://list.orgmode.org/9372527e-3852-419e-936a-7b4dd38cc847@app.fastmail.com/ - "greater_element_plain_list_trailing_whitespace_ownership_test_case_3" => Some("Seeing odd behavior about whitespace ownership."), // https://list.orgmode.org/9372527e-3852-419e-936a-7b4dd38cc847@app.fastmail.com/ - "greater_element_plain_list_trailing_whitespace_ownership_test_case_4" => Some("Seeing odd behavior about whitespace ownership."), // https://list.orgmode.org/9372527e-3852-419e-936a-7b4dd38cc847@app.fastmail.com/ + "autogen_greater_element_drawer_drawer_with_headline_inside" => Some("Apparently lines with :end: become their own paragraph. This odd behavior needs to be investigated more."), + "autogen_element_container_priority_footnote_definition_dynamic_block" => Some("Apparently broken begin lines become their own paragraph."), + "autogen_lesser_element_paragraphs_paragraph_with_backslash_line_breaks" => Some("The text we're getting out of the parse tree is already processed to remove line breaks, so our comparison needs to take that into account."), + "autogen_greater_element_plain_list_trailing_whitespace_ownership_test_case_1" => Some("Seeing odd behavior about whitespace ownership."), // https://list.orgmode.org/9372527e-3852-419e-936a-7b4dd38cc847@app.fastmail.com/ + "autogen_greater_element_plain_list_trailing_whitespace_ownership_test_case_3" => Some("Seeing odd behavior about whitespace ownership."), // https://list.orgmode.org/9372527e-3852-419e-936a-7b4dd38cc847@app.fastmail.com/ + "autogen_greater_element_plain_list_trailing_whitespace_ownership_test_case_4" => Some("Seeing odd behavior about whitespace ownership."), // https://list.orgmode.org/9372527e-3852-419e-936a-7b4dd38cc847@app.fastmail.com/ _ => None, } } diff --git a/tests/test_template b/tests/test_template index 53edd64..442db66 100644 --- a/tests/test_template +++ b/tests/test_template @@ -1,5 +1,5 @@ #[test] -fn autogen_{name}() {{ +fn {name}() {{ let todo_org_path = "{path}"; let org_contents = std::fs::read_to_string(todo_org_path).expect("Read org file."); println!("{{}}", org_contents);