MCPcopy Create free account
hub / github.com/Driver-C/tryssh / TestParseRemotePath_PlainHostPathWithPort

Function TestParseRemotePath_PlainHostPathWithPort

pkg/control/path_test.go:16–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14}
15
16func TestParseRemotePath_PlainHostPathWithPort(t *testing.T) {
17 host, path, ok := parseRemotePath("example.com:22:/tmp/file.txt")
18 // SplitN with 2 splits on the first colon only
19 assert.True(t, ok)
20 assert.Equal(t, "example.com", host)
21 assert.Equal(t, "22:/tmp/file.txt", path)
22}
23
24func TestParseRemotePath_Alias(t *testing.T) {
25 host, path, ok := parseRemotePath("myserver:/remote/dir")

Callers

nothing calls this directly

Calls 1

parseRemotePathFunction · 0.85

Tested by

no test coverage detected