kubeform.dev/terraform-backend-sdk@v0.0.0-20220310143633-45f07fe731c5/configs/named_values_test.go (about) 1 package configs 2 3 import ( 4 "testing" 5 ) 6 7 func Test_looksLikeSentences(t *testing.T) { 8 tests := map[string]struct { 9 args string 10 want bool 11 }{ 12 "empty sentence": { 13 args: "", 14 want: false, 15 }, 16 "valid sentence": { 17 args: "A valid sentence.", 18 want: true, 19 }, 20 "valid sentence with an accent": { 21 args: `A Valid sentence with an accent "é".`, 22 want: true, 23 }, 24 } 25 26 for name, tt := range tests { 27 t.Run(name, func(t *testing.T) { 28 if got := looksLikeSentences(tt.args); got != tt.want { 29 t.Errorf("looksLikeSentences() = %v, want %v", got, tt.want) 30 } 31 }) 32 } 33 }