Skip to content

Commit

Permalink
increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Maetad Sukarasud committed Dec 3, 2023
1 parent 78914a4 commit 2cc23a2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions translations/th/th_test.go
Expand Up @@ -351,6 +351,10 @@ func TestTranslations(t *testing.T) {
ns: "Test.Excludes",
expected: "Excludes ต้องไม่มี 'text'",
},
{
ns: "Test.ExcludesAll",
expected: "ExcludesAll ต้องไม่มีอักขระ '!@#$' ทั้งหมด",
},
{
ns: "Test.ExcludesRune",
expected: "ExcludesRune ต้องไม่มี '☻'",
Expand Down Expand Up @@ -647,6 +651,34 @@ func TestTranslations(t *testing.T) {
ns: "Test.CveString",
expected: "CveString ต้องเป็นรูปแบบ cve",
},
{
ns: "Test.StrPtrMinLen",
expected: "StrPtrMinLen ต้องมีความยาวอย่างน้อย 10 ตัวอักษร",
},
{
ns: "Test.StrPtrMaxLen",
expected: "StrPtrMaxLen ต้องมีความยาวไม่เกิน 1 ตัวอักษร",
},
{
ns: "Test.StrPtrLen",
expected: "StrPtrLen ต้องมีความยาว 2 ตัวอักษร",
},
{
ns: "Test.StrPtrLt",
expected: "StrPtrLt ต้องมีความยาวน้อยกว่า 1 ตัวอักษร",
},
{
ns: "Test.StrPtrLte",
expected: "StrPtrLte ต้องมีความยาวไม่เกิน 1 ตัวอักษร",
},
{
ns: "Test.StrPtrGt",
expected: "StrPtrGt ต้องมีความยาวมากกว่า 10 ตัวอักษร",
},
{
ns: "Test.StrPtrGte",
expected: "StrPtrGte ต้องมีความยาวอย่างน้อย 10 ตัวอักษร",
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 2cc23a2

Please sign in to comment.