add new chinese translations
This commit is contained in:
28
pages.zh/common/go-test.md
Normal file
28
pages.zh/common/go-test.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# go test
|
||||
|
||||
> 测试 Go 包(文件必须以 `_test.go` 结尾)。
|
||||
> 更多信息:<https://pkg.go.dev/cmd/go#hdr-Testing_flags>。
|
||||
|
||||
- 测试当前目录中的包:
|
||||
|
||||
`go test`
|
||||
|
||||
- [v] 详细测试当前目录中的包:
|
||||
|
||||
`go test -v`
|
||||
|
||||
- 测试当前目录及所有子目录中的包(注意 `...`):
|
||||
|
||||
`go test -v ./...`
|
||||
|
||||
- 测试当前目录中的包并运行所有基准测试:
|
||||
|
||||
`go test -v -bench .`
|
||||
|
||||
- 测试当前目录中的包并运行所有基准测试,持续 50 秒:
|
||||
|
||||
`go test -v -bench . -benchtime {{50s}}`
|
||||
|
||||
- 进行覆盖率分析的测试:
|
||||
|
||||
`go test -cover`
|
Reference in New Issue
Block a user