MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / skills_glob_flat_pattern

Function skills_glob_flat_pattern

atomic-agent/src/integrations/install.rs:1551–1589  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1549 #[test]
1550 #[file_serial]
1551 fn skills_glob_flat_pattern() {
1552 let home = tempfile::tempdir().unwrap();
1553 std::env::set_var("ATOMIC_INTEGRATIONS_HOME", home.path());
1554 let dst = tempfile::tempdir().unwrap();
1555
1556 // Cache with 2 declared skills.
1557 let cache = fake_skills_cache_multi(&["atomic-vault", "code-intelligence"]);
1558
1559 let pkg = tempfile::tempdir().unwrap();
1560 std::fs::write(
1561 pkg.path().join(MANIFEST_FILE),
1562 format!(
1563 r#"
1564schema = 1
1565agent = "flat-glob-test"
1566version = "1.0.0"
1567
1568[skills-source]
1569package = "atomic-skills"
1570
1571[skills]
1572install = "all"
1573dst_pattern = "{0}/workflows/{{name}}.md"
1574"#,
1575 toml_path(dst.path()),
1576 ),
1577 )
1578 .unwrap();
1579
1580 let mut o = opts(false);
1581 o.skills_cache_dir = Some(cache.path().to_path_buf());
1582 let outcome = install_from_dir(pkg.path(), &o).unwrap();
1583
1584 // 2 skills installed as flat .md files.
1585 assert_eq!(outcome.installed.len(), 2);
1586 assert!(dst.path().join("workflows/atomic-vault.md").exists());
1587 assert!(dst.path().join("workflows/code-intelligence.md").exists());
1588 std::env::remove_var("ATOMIC_INTEGRATIONS_HOME");
1589 }
1590
1591 #[test]
1592 #[file_serial]

Callers

nothing calls this directly

Calls 6

fake_skills_cache_multiFunction · 0.85
optsFunction · 0.85
install_from_dirFunction · 0.85
writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected