-
Notifications
You must be signed in to change notification settings - Fork 0
/
vx_test.go
56 lines (53 loc) · 1.28 KB
/
vx_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package vx_test
import (
"testing"
"github.com/ianfoo/vx"
)
func TestProceed(t *testing.T) {
tt := []struct {
in string
proceed, valid bool
}{
{"k", true, true},
{"K", true, true},
{"kk", true, true},
{"kK", true, true},
{" k ", true, true},
{"kkk", false, false},
{"yas", true, true},
{"yaas", true, true},
{"YAAAAAAS", true, true},
{"yeh", true, true},
{" yeh ", true, true},
{" YEH\t", true, true},
{"yeah", false, false},
{"w/e", false, true},
{"W/E", false, true},
{"\tw/e ", false, true},
{"naw", false, true},
{"NAW DAWG", false, true},
{"naw dawg", false, true},
{"naw\tdawg", false, true},
{"naw dawg", false, true},
{"nah", false, true},
{"nah dawg", false, true},
{"ur face", false, true},
{"Ur Face", false, true},
{"ur face", false, true},
{"gtfo", false, true},
{"GTFO", false, true},
{"NO U", false, true},
{"no u", false, true},
}
for _, tc := range tt {
t.Run(tc.in, func(t *testing.T) {
gotProceed, gotValid := vx.Proceed(tc.in)
if want, got := tc.valid, gotValid; want != got {
t.Fatalf("%q: wanted valid value = %t, got %t", tc.in, want, got)
}
if want, got := tc.proceed, gotProceed; want != got {
t.Errorf("%q: wanted proceed value = %t, got %t", tc.in, want, got)
}
})
}
}