MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_search_simple

Function test_search_simple

core/src/context/fs_provider.rs:317–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

315
316 #[tokio::test]
317 async fn test_search_simple() {
318 let temp_dir = TempDir::new().unwrap();
319 create_test_files(temp_dir.path()).unwrap();
320
321 let config = FileSystemContextConfig::new(temp_dir.path());
322 let provider = FileSystemContextProvider::new(config);
323
324 let query = ContextQuery::new("Rust programming");
325 let result = provider.query(&query).await.unwrap();
326
327 assert!(!result.items.is_empty());
328 assert!(result
329 .items
330 .iter()
331 .any(|item| item.content.contains("Rust")));
332 }
333}

Callers

nothing calls this directly

Calls 3

create_test_filesFunction · 0.85
pathMethod · 0.80
queryMethod · 0.45

Tested by

no test coverage detected