()
| 2033 | |
| 2034 | #[tokio::test] |
| 2035 | async fn parser_accepts_include_file() { |
| 2036 | let temp_dir = tempdir().expect("failed to create benchmark test directory"); |
| 2037 | let include_path = |
| 2038 | write_test_file(&temp_dir, "include.benchmark", "run\nselect 1\n"); |
| 2039 | |
| 2040 | let benchmark_path = write_test_file( |
| 2041 | &temp_dir, |
| 2042 | "include_driver.benchmark", |
| 2043 | &format!("include {}\n", include_path.display()), |
| 2044 | ); |
| 2045 | |
| 2046 | let result = parse_benchmark_file(&benchmark_path).await; |
| 2047 | |
| 2048 | let benchmark = result.expect("benchmark should parse"); |
| 2049 | assert_eq!( |
| 2050 | benchmark |
| 2051 | .queries() |
| 2052 | .get(&QueryDirective::Run) |
| 2053 | .expect("run query"), |
| 2054 | &vec!["select 1".to_string()] |
| 2055 | ); |
| 2056 | } |
| 2057 | |
| 2058 | #[tokio::test] |
| 2059 | async fn parser_accepts_template_file_with_parameters() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…