package mysql import "testing" func TestModuleNameFromTable(t *testing.T) { tests := []struct { table string want string }{ {table: "takeover_acs", want: "takeover"}, {table: "base_operational_shift_times", want: "base operational shift times"}, {table: "base_contact_roles", want: "base contact roles"}, {table: "duls", want: "dul"}, {table: "takeover_other_people", want: "takeover other people"}, } for _, tc := range tests { if got := moduleNameFromTable(tc.table); got != tc.want { t.Fatalf("moduleNameFromTable(%q) = %q, want %q", tc.table, got, tc.want) } } }