()
| 11 | |
| 12 | #[test] |
| 13 | fn test_specs() { |
| 14 | for json_path in get_json_file_paths_in_dir(Path::new("./tests/specs")) { |
| 15 | let text_file_path = json_path.with_extension("txt"); |
| 16 | let json_file_text = fs::read_to_string(&json_path).unwrap().replace("\r\n", "\n"); |
| 17 | let result = parse_to_ast( |
| 18 | &json_file_text, |
| 19 | &CollectOptions { |
| 20 | comments: CommentCollectionStrategy::Separate, |
| 21 | tokens: true, |
| 22 | }, |
| 23 | &Default::default(), |
| 24 | ) |
| 25 | .expect("Expected no error."); |
| 26 | let result_text = parse_result_to_test_str(&result); |
| 27 | let expected_text = fs::read_to_string(&text_file_path).unwrap().replace("\r\n", "\n"); |
| 28 | // fs::write(&text_file_path, result_text.clone()).unwrap(); |
| 29 | assert_eq!(result_text.trim(), expected_text.trim()); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | #[cfg(feature = "cst")] |
| 34 | #[test] |
nothing calls this directly
no test coverage detected
searching dependent graphs…