Skip to content

Commit 005b33c

Browse files
committed
tests: add tests
Signed-off-by: Fernandez Ludovic <[email protected]>
1 parent 7cfdb7f commit 005b33c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/section/local_module_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package section
2+
3+
import (
4+
"testing"
5+
6+
"github.com/daixiang0/gci/pkg/specificity"
7+
)
8+
9+
func TestLocalModule_specificity(t *testing.T) {
10+
testCases := []specificityTestData{
11+
{"example.com/hello", &LocalModule{Path: "example.com/hello"}, specificity.LocalModule{}},
12+
{"example.com/hello/world", &LocalModule{Path: "example.com/hello"}, specificity.LocalModule{}},
13+
{"example.com/hello-test", &LocalModule{Path: "example.com/hello"}, specificity.MisMatch{}},
14+
}
15+
testSpecificity(t, testCases)
16+
}

0 commit comments

Comments
 (0)