Compare commits
6 Commits
ad5efc4b0f
...
v0.1.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b54f95087 | ||
|
|
17c2e9fefe | ||
|
|
d2d8c1ffcf | ||
|
|
b9c638c280 | ||
|
|
8ac8f9fe6e | ||
|
|
ddb3144e66 |
@@ -152,6 +152,26 @@ spec:
|
|||||||
value: ["--no-default-features", "--features", "tracing,compare"]
|
value: ["--no-default-features", "--features", "tracing,compare"]
|
||||||
- name: docker-image
|
- name: docker-image
|
||||||
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
|
- name: run-image-compare-foreign
|
||||||
|
taskRef:
|
||||||
|
name: run-docker-image
|
||||||
|
workspaces:
|
||||||
|
- name: source
|
||||||
|
workspace: git-source
|
||||||
|
- name: cargo-cache
|
||||||
|
workspace: cargo-cache
|
||||||
|
runAfter:
|
||||||
|
- run-image-tracing-compare
|
||||||
|
params:
|
||||||
|
- name: args
|
||||||
|
value:
|
||||||
|
[
|
||||||
|
"--no-default-features",
|
||||||
|
"--features",
|
||||||
|
"compare,foreign_document_test",
|
||||||
|
]
|
||||||
|
- name: docker-image
|
||||||
|
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
|
||||||
- name: run-image-all
|
- name: run-image-all
|
||||||
taskRef:
|
taskRef:
|
||||||
name: run-docker-image
|
name: run-docker-image
|
||||||
@@ -161,7 +181,7 @@ spec:
|
|||||||
- name: cargo-cache
|
- name: cargo-cache
|
||||||
workspace: cargo-cache
|
workspace: cargo-cache
|
||||||
runAfter:
|
runAfter:
|
||||||
- run-image-default
|
- run-image-compare-foreign
|
||||||
params:
|
params:
|
||||||
- name: args
|
- name: args
|
||||||
value:
|
value:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "organic"
|
name = "organic"
|
||||||
version = "0.1.9"
|
version = "0.1.10"
|
||||||
authors = ["Tom Alexander <tom@fizz.buzz>"]
|
authors = ["Tom Alexander <tom@fizz.buzz>"]
|
||||||
description = "An org-mode parser."
|
description = "An org-mode parser."
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -54,7 +54,7 @@ walkdir = "2.3.3"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
compare = ["tokio/process"]
|
compare = ["tokio/process", "tokio/macros"]
|
||||||
foreign_document_test = ["compare", "dep:futures", "tokio/sync", "dep:walkdir", "tokio/process"]
|
foreign_document_test = ["compare", "dep:futures", "tokio/sync", "dep:walkdir", "tokio/process"]
|
||||||
tracing = ["dep:opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry-semantic-conventions", "dep:tokio", "dep:tracing", "dep:tracing-opentelemetry", "dep:tracing-subscriber"]
|
tracing = ["dep:opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry-semantic-conventions", "dep:tokio", "dep:tracing", "dep:tracing-opentelemetry", "dep:tracing-subscriber"]
|
||||||
|
|
||||||
|
|||||||
1
Makefile
1
Makefile
@@ -52,6 +52,7 @@ buildtest:
|
|||||||
> cargo build --no-default-features --features compare
|
> cargo build --no-default-features --features compare
|
||||||
> cargo build --no-default-features --features tracing
|
> cargo build --no-default-features --features tracing
|
||||||
> cargo build --no-default-features --features compare,tracing
|
> cargo build --no-default-features --features compare,tracing
|
||||||
|
> cargo build --no-default-features --features compare,foreign_document_test
|
||||||
> cargo build --no-default-features --features compare,tracing,foreign_document_test
|
> cargo build --no-default-features --features compare,tracing,foreign_document_test
|
||||||
|
|
||||||
.PHONY: foreign_document_test
|
.PHONY: foreign_document_test
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let rt = tokio::runtime::Runtime::new()?;
|
let rt = tokio::runtime::Runtime::new()?;
|
||||||
let result = rt.block_on(async {
|
let result = rt.block_on(async {
|
||||||
init_telemetry()?;
|
init_telemetry()?;
|
||||||
let main_body_result = main_body();
|
let main_body_result = main_body().await;
|
||||||
shutdown_telemetry()?;
|
shutdown_telemetry()?;
|
||||||
main_body_result
|
main_body_result
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ use crate::types::Keyword;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn babel_call<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn babel_call<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use crate::types::Keyword;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn diary_sexp<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn diary_sexp<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ use crate::types::SetSource;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn drawer<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn drawer<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ use crate::types::SetSource;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn dynamic_block<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn dynamic_block<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
use nom::branch::alt;
|
use nom::branch::alt;
|
||||||
use nom::multi::many0;
|
use nom::multi::many0;
|
||||||
#[cfg(feature = "tracing")]
|
|
||||||
use tracing::span;
|
|
||||||
|
|
||||||
use super::babel_call::babel_call;
|
use super::babel_call::babel_call;
|
||||||
use super::clock::clock;
|
use super::clock::clock;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use crate::types::Keyword;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn fixed_width_area<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn fixed_width_area<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ use crate::types::Keyword;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn footnote_definition<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn footnote_definition<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ use crate::types::SpecialBlock;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn greater_block<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn greater_block<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
@@ -93,7 +93,7 @@ where
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
fn center_block<'b, 'g, 'r, 's, AK>(
|
fn center_block<'b, 'g, 'r, 's, AK>(
|
||||||
context: RefContext<'b, 'g, 'r, 's>,
|
context: RefContext<'b, 'g, 'r, 's>,
|
||||||
@@ -126,7 +126,7 @@ where
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
fn quote_block<'b, 'g, 'r, 's, AK>(
|
fn quote_block<'b, 'g, 'r, 's, AK>(
|
||||||
context: RefContext<'b, 'g, 'r, 's>,
|
context: RefContext<'b, 'g, 'r, 's>,
|
||||||
@@ -184,7 +184,7 @@ where
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
fn _special_block<'c, 'b, 'g, 'r, 's, AK>(
|
fn _special_block<'c, 'b, 'g, 'r, 's, AK>(
|
||||||
context: RefContext<'b, 'g, 'r, 's>,
|
context: RefContext<'b, 'g, 'r, 's>,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ use crate::types::Keyword;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn horizontal_rule<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn horizontal_rule<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ fn _filtered_keyword<'s, F: Matcher>(
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn keyword<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn keyword<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ use crate::types::LatexEnvironment;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn latex_environment<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn latex_environment<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ use crate::types::VerseBlock;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn verse_block<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn verse_block<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
@@ -118,7 +118,7 @@ where
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn comment_block<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn comment_block<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
@@ -166,7 +166,7 @@ where
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn example_block<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn example_block<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
@@ -247,7 +247,7 @@ where
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn export_block<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn export_block<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
@@ -303,7 +303,7 @@ where
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn src_block<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn src_block<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ use crate::types::Paragraph;
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn paragraph<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn paragraph<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ pub(crate) fn detect_plain_list<'b, 'g, 'r, 's>(
|
|||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn plain_list<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn plain_list<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ use crate::types::TableRow;
|
|||||||
/// This is not the table.el style.
|
/// This is not the table.el style.
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
feature = "tracing",
|
feature = "tracing",
|
||||||
tracing::instrument(ret, level = "debug", skip(context))
|
tracing::instrument(ret, level = "debug", skip(context, affiliated_keywords))
|
||||||
)]
|
)]
|
||||||
pub(crate) fn org_mode_table<'b, 'g, 'r, 's, AK>(
|
pub(crate) fn org_mode_table<'b, 'g, 'r, 's, AK>(
|
||||||
affiliated_keywords: AK,
|
affiliated_keywords: AK,
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
// TODO: Investigate writing a proc macro to make specifying these combinations easier. For example, currently I am only setting 1 setting per test to keep the repetition reasonable when I should be mixing all the different combinations.
|
// TODO: Investigate writing a proc macro to make specifying these combinations easier. For example, currently I am only setting 1 setting per test to keep the repetition reasonable when I should be mixing all the different combinations.
|
||||||
|
|
||||||
{expect_fail}
|
{expect_fail}
|
||||||
#[test]
|
#[tokio::test]
|
||||||
fn autogen_default_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
async fn autogen_default_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||||
let org_path = "{path}";
|
let org_path = "{path}";
|
||||||
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
||||||
organic::compare::run_anonymous_compare(org_contents.as_str())?;
|
organic::compare::run_anonymous_compare(org_contents.as_str()).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{expect_fail}
|
{expect_fail}
|
||||||
#[test]
|
#[tokio::test]
|
||||||
fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
async fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||||
let org_path = "{path}";
|
let org_path = "{path}";
|
||||||
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
||||||
let global_settings = {{
|
let global_settings = {{
|
||||||
@@ -19,13 +19,13 @@ fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
|||||||
global_settings.list_allow_alphabetical = true;
|
global_settings.list_allow_alphabetical = true;
|
||||||
global_settings
|
global_settings
|
||||||
}};
|
}};
|
||||||
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
|
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings, false).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{expect_fail}
|
{expect_fail}
|
||||||
#[test]
|
#[tokio::test]
|
||||||
fn autogen_t1_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
async fn autogen_t1_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||||
let org_path = "{path}";
|
let org_path = "{path}";
|
||||||
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
||||||
let global_settings = {{
|
let global_settings = {{
|
||||||
@@ -33,13 +33,13 @@ fn autogen_t1_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
|||||||
global_settings.tab_width = 1;
|
global_settings.tab_width = 1;
|
||||||
global_settings
|
global_settings
|
||||||
}};
|
}};
|
||||||
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
|
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings, false).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{expect_fail}
|
{expect_fail}
|
||||||
#[test]
|
#[tokio::test]
|
||||||
fn autogen_t16_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
async fn autogen_t16_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||||
let org_path = "{path}";
|
let org_path = "{path}";
|
||||||
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
||||||
let global_settings = {{
|
let global_settings = {{
|
||||||
@@ -47,13 +47,13 @@ fn autogen_t16_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
|||||||
global_settings.tab_width = 16;
|
global_settings.tab_width = 16;
|
||||||
global_settings
|
global_settings
|
||||||
}};
|
}};
|
||||||
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
|
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings, false).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{expect_fail}
|
{expect_fail}
|
||||||
#[test]
|
#[tokio::test]
|
||||||
fn autogen_odd_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
async fn autogen_odd_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||||
let org_path = "{path}";
|
let org_path = "{path}";
|
||||||
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
||||||
let global_settings = {{
|
let global_settings = {{
|
||||||
@@ -61,6 +61,6 @@ fn autogen_odd_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
|||||||
global_settings.odd_levels_only = organic::settings::HeadlineLevelFilter::Odd;
|
global_settings.odd_levels_only = organic::settings::HeadlineLevelFilter::Odd;
|
||||||
global_settings
|
global_settings
|
||||||
}};
|
}};
|
||||||
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings)?;
|
organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings, false).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user