MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / upsert_host_block_appends_when_missing

Function upsert_host_block_appends_when_missing

crates/openshell-cli/src/ssh.rs:1637–1644  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1635
1636 #[test]
1637 fn upsert_host_block_appends_when_missing() {
1638 let input = "Host existing\n HostName example.com\n";
1639 let block = "Host openshell-demo\n User sandbox\n";
1640 let output = upsert_host_block(input, "openshell-demo", block);
1641 assert!(output.contains("Host existing"));
1642 assert!(output.contains("Host openshell-demo"));
1643 assert_eq!(output.matches("Host openshell-demo").count(), 1);
1644 }
1645
1646 #[test]
1647 fn upsert_host_block_replaces_existing_without_duplicates() {

Callers

nothing calls this directly

Calls 1

upsert_host_blockFunction · 0.85

Tested by

no test coverage detected