Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
esimkowitz committed Feb 6, 2025
1 parent 523a084 commit 1df574d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pkg/remote/connparse/connparse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,28 @@ func TestParseURI_WSHCurrentPath(t *testing.T) {
if c.GetFullURI() != expected {
t.Fatalf("expected full URI to be %q, got %q", expected, c.GetFullURI())
}

cstr = "/etc/path/to/file"
c, err = connparse.ParseURI(cstr)
if err != nil {
t.Fatalf("failed to parse URI: %v", err)
}
expected = "/etc/path/to/file"
if c.Path != expected {
t.Fatalf("expected path to be %q, got %q", expected, c.Path)
}
expected = "current"
if c.Host != expected {
t.Fatalf("expected host to be %q, got %q", expected, c.Host)
}
expected = "wsh"
if c.Scheme != expected {
t.Fatalf("expected scheme to be %q, got %q", expected, c.Scheme)
}
expected = "wsh://current/etc/path/to/file"
if c.GetFullURI() != expected {
t.Fatalf("expected full URI to be %q, got %q", expected, c.GetFullURI())
}
}

func TestParseURI_WSHCurrentPathWindows(t *testing.T) {
Expand Down

0 comments on commit 1df574d

Please sign in to comment.