test: improve coverage across package

This commit is contained in:
2026-05-01 14:09:10 +05:30
parent e1c68ec7d0
commit e3f1f5046a
18 changed files with 2652 additions and 6 deletions

View File

@@ -41,6 +41,29 @@ func main() {
}
```
## Testing
Run all tests:
```bash
go test ./...
```
Run tests with coverage:
```bash
go test -cover ./... # per-package summary
go test -coverprofile=coverage.out ./... # full profile
go tool cover -html=coverage.out -o coverage.html # HTML report
```
Run tests for a specific package:
```bash
go test -v ./analyzer/tcp/
go test -v -run TestSSH ./analyzer/tcp/
```
Based on OpenGFW by apernet: https://github.com/apernet/OpenGFW
## LICENSE