(dir: &Path)
| 285 | use tempfile::TempDir; |
| 286 | |
| 287 | fn create_test_files(dir: &Path) -> anyhow::Result<()> { |
| 288 | let mut file1 = File::create(dir.join("test1.rs"))?; |
| 289 | writeln!(file1, "fn main() {{\n println!(\"Hello, world!\");\n}}")?; |
| 290 | |
| 291 | let mut file2 = File::create(dir.join("test2.md"))?; |
| 292 | writeln!( |
| 293 | file2, |
| 294 | "# Test Document\n\nThis is a test document about Rust programming." |
| 295 | )?; |
| 296 | |
| 297 | fs::create_dir(dir.join("subdir"))?; |
| 298 | let mut file4 = File::create(dir.join("subdir/test4.rs"))?; |
| 299 | writeln!(file4, "fn test() {{\n // Test function\n}}")?; |
| 300 | |
| 301 | Ok(()) |
| 302 | } |
| 303 | |
| 304 | #[tokio::test] |
| 305 | async fn test_index_files() { |
no outgoing calls