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

Function test_config_builders

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

Source from the content-addressed store, hash-verified

433
434 #[test]
435 fn test_config_builders() {
436 let config = RipgrepContextConfig::new("/tmp")
437 .with_include_patterns(vec!["**/*.rs".to_string()])
438 .with_exclude_patterns(vec!["**/test/**".to_string()])
439 .with_max_file_size(2048)
440 .with_case_insensitive(false)
441 .with_context_lines(5);
442
443 assert_eq!(config.include_patterns, vec!["**/*.rs"]);
444 assert_eq!(config.exclude_patterns, vec!["**/test/**"]);
445 assert_eq!(config.max_file_size, 2048);
446 assert!(!config.case_insensitive);
447 assert_eq!(config.context_lines, 5);
448 }
449
450 #[tokio::test]
451 async fn test_provider_search() {

Callers

nothing calls this directly

Calls 5

with_context_linesMethod · 0.80
with_case_insensitiveMethod · 0.80
with_max_file_sizeMethod · 0.45
with_exclude_patternsMethod · 0.45
with_include_patternsMethod · 0.45

Tested by

no test coverage detected