Fix the tests.
This commit is contained in:
		
							parent
							
								
									ad5efc4b0f
								
							
						
					
					
						commit
						ddb3144e66
					
				| @ -54,7 +54,7 @@ walkdir = "2.3.3" | ||||
| 
 | ||||
| [features] | ||||
| default = [] | ||||
| compare = ["tokio/process"] | ||||
| compare = ["tokio/process", "tokio/macros"] | ||||
| 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"] | ||||
| 
 | ||||
|  | ||||
| @ -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. | ||||
| 
 | ||||
| {expect_fail} | ||||
| #[test] | ||||
| fn autogen_default_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
| #[tokio::test] | ||||
| async fn autogen_default_{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())?; | ||||
|     organic::compare::run_anonymous_compare(org_contents.as_str()).await?; | ||||
|     Ok(()) | ||||
| }} | ||||
| 
 | ||||
| {expect_fail} | ||||
| #[test] | ||||
| fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
| #[tokio::test] | ||||
| async 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 = {{ | ||||
| @ -19,13 +19,13 @@ fn autogen_la_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
|         global_settings.list_allow_alphabetical = true; | ||||
|         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(()) | ||||
| }} | ||||
| 
 | ||||
| {expect_fail} | ||||
| #[test] | ||||
| fn autogen_t1_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
| #[tokio::test] | ||||
| async 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 = {{ | ||||
| @ -33,13 +33,13 @@ fn autogen_t1_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
|         global_settings.tab_width = 1; | ||||
|         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(()) | ||||
| }} | ||||
| 
 | ||||
| {expect_fail} | ||||
| #[test] | ||||
| fn autogen_t16_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
| #[tokio::test] | ||||
| async 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 = {{ | ||||
| @ -47,13 +47,13 @@ fn autogen_t16_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
|         global_settings.tab_width = 16; | ||||
|         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(()) | ||||
| }} | ||||
| 
 | ||||
| {expect_fail} | ||||
| #[test] | ||||
| fn autogen_odd_{name}() -> Result<(), Box<dyn std::error::Error>> {{ | ||||
| #[tokio::test] | ||||
| async fn autogen_odd_{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 = {{ | ||||
| @ -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 | ||||
|     }}; | ||||
|     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(()) | ||||
| }} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander