MCPcopy Create free account
hub / github.com/dallay/agentsync / test_sync_default_agents_support_aliases

Function test_sync_default_agents_support_aliases

src/linker.rs:2441–2470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2439 #[test]
2440 #[cfg(unix)]
2441 fn test_sync_default_agents_support_aliases() {
2442 let temp_dir = TempDir::new().unwrap();
2443 let agents_dir = temp_dir.path().join(".agents");
2444 fs::create_dir_all(&agents_dir).unwrap();
2445
2446 let source_file = agents_dir.join("AGENTS.md");
2447 fs::write(&source_file, "# Test").unwrap();
2448
2449 let config_path = agents_dir.join("agentsync.toml");
2450 let config_content = r#"
2451 source_dir = "."
2452 default_agents = ["codex-cli"]
2453
2454 [agents.codex]
2455 enabled = true
2456 [agents.codex.targets.main]
2457 source = "AGENTS.md"
2458 destination = "CODEX.md"
2459 type = "symlink"
2460 "#;
2461 fs::write(&config_path, config_content).unwrap();
2462
2463 let config = Config::load(&config_path).unwrap();
2464 let linker = Linker::new(config, config_path);
2465
2466 let result = linker.sync(&SyncOptions::default()).unwrap();
2467
2468 assert_eq!(result.created, 1);
2469 assert!(temp_dir.path().join("CODEX.md").exists());
2470 }
2471
2472 #[test]
2473 #[cfg(unix)]

Callers

nothing calls this directly

Calls 1

syncMethod · 0.80

Tested by

no test coverage detected