MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / test_config_merge

Function test_config_merge

crates/opencode-config/src/loader.rs:1494–1514  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1492
1493 #[test]
1494 fn test_config_merge() {
1495 let mut config1 = Config {
1496 model: Some("model1".to_string()),
1497 instructions: vec!["inst1".to_string()],
1498 ..Default::default()
1499 };
1500
1501 let config2 = Config {
1502 model: Some("model2".to_string()),
1503 instructions: vec!["inst2".to_string()],
1504 ..Default::default()
1505 };
1506
1507 config1.merge(config2);
1508
1509 assert_eq!(config1.model, Some("model2".to_string()));
1510 assert_eq!(
1511 config1.instructions,
1512 vec!["inst1".to_string(), "inst2".to_string()]
1513 );
1514 }
1515
1516 #[test]
1517 fn test_load_project_finds_and_merges_parent_configs() {

Callers

nothing calls this directly

Calls 1

mergeMethod · 0.45

Tested by

no test coverage detected