Skip to content

Commit

Permalink
add uri_unix_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyenought committed Nov 20, 2023
1 parent 71c2c01 commit 06b8a5d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/protocol/uri_unix_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package protocol

import (

Check failure on line 3 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.18)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 3 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.19)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 3 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.20)

File is not `gofumpt`-ed (gofumpt)
"github.com/cloudwego/hertz/pkg/common/test/assert"

Check failure on line 4 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.18)

File is not `goimports`-ed (goimports)

Check failure on line 4 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.19)

File is not `goimports`-ed (goimports)

Check failure on line 4 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.20)

File is not `goimports`-ed (goimports)
"testing"

Check failure on line 5 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.18)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 5 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.19)

File is not `gofumpt`-ed (gofumpt)

Check failure on line 5 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / lint-and-ut (1.20)

File is not `gofumpt`-ed (gofumpt)
)

func TestGetScheme(t *testing.T) {

Check failure on line 8 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / ut-windows (1.18)

other declaration of TestGetScheme

Check failure on line 8 in pkg/protocol/uri_unix_test.go

View workflow job for this annotation

GitHub Actions / ut-windows (1.19)

other declaration of TestGetScheme
scheme, path := getScheme([]byte("/file.go"))
assert.DeepEqual(t, "", string(scheme))
assert.DeepEqual(t, "/file.go", string(path))

scheme, path = getScheme([]byte("https://foo.com"))
assert.DeepEqual(t, "https", string(scheme))
assert.DeepEqual(t, "//foo.com", string(path))
}

0 comments on commit 06b8a5d

Please sign in to comment.