()
| 404 | } |
| 405 | |
| 406 | fn fixture() -> (TempDir, TestRepository, Hash) { |
| 407 | let (temp, mut repo) = create_temp_repo(); |
| 408 | std::fs::create_dir_all(temp.path().join("src")).unwrap(); |
| 409 | std::fs::write( |
| 410 | temp.path().join("src/lib.rs"), |
| 411 | "pub fn target() {}\npub fn caller() { target(); }\n// inherited_marker\n", |
| 412 | ) |
| 413 | .unwrap(); |
| 414 | repo.add("src/lib.rs", TrackingOptions::default()).unwrap(); |
| 415 | record(&repo, "inherited history"); |
| 416 | repo.kg_enrich_from_vcs(repo.working_copy()).unwrap(); |
| 417 | repo.create_draft_view("feature", "dev").unwrap(); |
| 418 | repo.switch_view("feature").unwrap(); |
| 419 | std::fs::write( |
| 420 | temp.path().join("src/lib.rs"), |
| 421 | "pub fn target(secret: SiblingSecret) {}\npub fn caller() {}\n// inherited_marker\n", |
| 422 | ) |
| 423 | .unwrap(); |
| 424 | std::fs::write( |
| 425 | temp.path().join("src/sibling.rs"), |
| 426 | "pub fn sibling_only() { target(); }\n// sibling_marker\n", |
| 427 | ) |
| 428 | .unwrap(); |
| 429 | repo.add("src/sibling.rs", TrackingOptions::default()) |
| 430 | .unwrap(); |
| 431 | let feature = record(&repo, "sibling_history_marker"); |
| 432 | repo.kg_enrich_from_vcs(repo.working_copy()).unwrap(); |
| 433 | crate::build_content_index(temp.path()).unwrap(); |
| 434 | (temp, repo, feature) |
| 435 | } |
| 436 | |
| 437 | #[test] |
| 438 | fn query_search_filters_before_ranking_and_uses_recorded_sources() { |
no test coverage detected