MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / discover_test_paths

Function discover_test_paths

xtask/src/extension_catalog.rs:1471–1498  ·  view source on GitHub ↗
(id: &str)

Source from the content-addressed store, hash-verified

1469}
1470
1471fn discover_test_paths(id: &str) -> Vec<String> {
1472 let mut paths = Vec::new();
1473 let mut test_names = vec![id.to_owned()];
1474 if id == "vector" {
1475 test_names.push("pgvector".to_owned());
1476 }
1477 for test_name in test_names {
1478 for candidate in [
1479 Path::new(PGLITE_TESTS)
1480 .join("contrib")
1481 .join(format!("{test_name}.test.js")),
1482 Path::new(PGLITE_TESTS)
1483 .join("contrib")
1484 .join(format!("{test_name}.test.ts")),
1485 Path::new(PGLITE_TESTS).join(format!("{test_name}.test.js")),
1486 Path::new(PGLITE_TESTS).join(format!("{test_name}.test.ts")),
1487 Path::new(PGLITE_POSTGIS_TESTS).join(format!("{test_name}.test.ts")),
1488 Path::new(PGLITE_POSTGIS_TESTS).join(format!("{test_name}.test.js")),
1489 ] {
1490 if candidate.is_file() {
1491 paths.push(normalize_path(&candidate));
1492 }
1493 }
1494 }
1495 paths.sort();
1496 paths.dedup();
1497 paths
1498}
1499
1500fn known_load_order(id: &str) -> Vec<String> {
1501 match id {

Callers 1

discover_catalogFunction · 0.85

Calls 3

pushMethod · 0.80
normalize_pathFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected