mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
add test for license check
This commit is contained in:
14
check/license_test.go
Normal file
14
check/license_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package check
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestPercentage(t *testing.T) {
|
||||
g := License{"testfiles", []string{}}
|
||||
p, _, err := g.Percentage()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if p != 1.0 {
|
||||
t.Errorf("License check failed")
|
||||
}
|
||||
}
|
||||
0
check/testfiles/LICENCE.txt
Normal file
0
check/testfiles/LICENCE.txt
Normal file
Reference in New Issue
Block a user