Skip to content

Commit 1df574d

Browse files
committed
more tests
1 parent 523a084 commit 1df574d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pkg/remote/connparse/connparse_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,28 @@ func TestParseURI_WSHCurrentPath(t *testing.T) {
234234
if c.GetFullURI() != expected {
235235
t.Fatalf("expected full URI to be %q, got %q", expected, c.GetFullURI())
236236
}
237+
238+
cstr = "/etc/path/to/file"
239+
c, err = connparse.ParseURI(cstr)
240+
if err != nil {
241+
t.Fatalf("failed to parse URI: %v", err)
242+
}
243+
expected = "/etc/path/to/file"
244+
if c.Path != expected {
245+
t.Fatalf("expected path to be %q, got %q", expected, c.Path)
246+
}
247+
expected = "current"
248+
if c.Host != expected {
249+
t.Fatalf("expected host to be %q, got %q", expected, c.Host)
250+
}
251+
expected = "wsh"
252+
if c.Scheme != expected {
253+
t.Fatalf("expected scheme to be %q, got %q", expected, c.Scheme)
254+
}
255+
expected = "wsh://current/etc/path/to/file"
256+
if c.GetFullURI() != expected {
257+
t.Fatalf("expected full URI to be %q, got %q", expected, c.GetFullURI())
258+
}
237259
}
238260

239261
func TestParseURI_WSHCurrentPathWindows(t *testing.T) {

0 commit comments

Comments
 (0)