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

Function test_provider_search

core/src/context/ripgrep_provider.rs:451–466  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

449
450 #[tokio::test]
451 async fn test_provider_search() {
452 let dir = setup_test_workspace();
453 let config = RipgrepContextConfig::new(dir.path());
454 let provider = RipgrepContextProvider::new(config);
455
456 let query = ContextQuery::new("Rust");
457 let result = provider.query(&query).await.unwrap();
458
459 assert_eq!(result.provider, "ripgrep");
460 assert!(!result.items.is_empty());
461 // Should find "Rust" in README.md
462 assert!(result
463 .items
464 .iter()
465 .any(|item| item.content.contains("Rust")));
466 }
467
468 #[tokio::test]
469 async fn test_provider_case_insensitive() {

Callers

nothing calls this directly

Calls 3

setup_test_workspaceFunction · 0.85
pathMethod · 0.80
queryMethod · 0.45

Tested by

no test coverage detected