Skip to content

Commit 43e90f6

Browse files
committed
test: add UT and testcase
1 parent 0a635b1 commit 43e90f6

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

commit-msg_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// commit-msg_test.go
2+
package main
3+
4+
import (
5+
"testing"
6+
)
7+
8+
func TestGetMsg(t *testing.T) {
9+
if msg := getMsg("testcase/sample.txt"); msg == "" {
10+
t.Error("Failed!")
11+
}
12+
}

testcase/sample.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
feat(scope): some new feat
2+
3+
this is body
4+
5+
and this is footer

0 commit comments

Comments
 (0)