Skip to content

Commit 33d0ce2

Browse files
add more unit test
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
1 parent 0c5bf3e commit 33d0ce2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ctl/version/version_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,19 @@ func Test_stringMatch(t *testing.T) {
4242
want: true,
4343
},
4444
{
45-
name: "fail example",
45+
name: "failed example",
4646
args: args{
4747
str: "7.8.5",
4848
},
4949
want: false,
5050
},
51+
{
52+
name: "Incorrect Suffix",
53+
args: args{
54+
str: "v1.1.1-alpha.0",
55+
},
56+
want: false,
57+
},
5158
}
5259
for _, tt := range tests {
5360
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)