Skip to content

Commit

Permalink
test: improve the entrypoint coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Jun 12, 2022
1 parent d7db5a7 commit 4de0a94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ ok github.com/soulteary/apt-proxy 0.793s
View coverage report:

```
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
# go test -coverprofile=coverage.out ./...
PASS
coverage: 86.7% of statements
Expand Down
2 changes: 2 additions & 0 deletions apt-proxy_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package main

import (
"os"
"testing"
)

func TestParseFlags(t *testing.T) {
os.Args = append(os.Args, "--type=not-support-os")
flags := parseFlags()

if flags.Debug != DEFAULT_DEBUG {
Expand Down

0 comments on commit 4de0a94

Please sign in to comment.