package extsvc import "testing" // TQSL refuses whole records over a MY_CNTY it cannot validate, and its // validation is the US "XX,County" enumeration — so anything else must be // stripped before signing, and the US shape must survive untouched. func TestScrubMyCnty(t *testing.T) { cases := []struct{ in, want string }{ {"F4BPOONTARIO,KawarthaONTARIO", "F4BPOONTARIO"}, {"Kawartha", ""}, {"NY,Monroe", "NY,Monroe"}, {"K1AB", "K1AB"}, {"Kawartha\nNY,Monroe", "\nNY,Monroe"}, } for _, c := range cases { if got := scrubMyCnty(c.in); got != c.want { t.Errorf("scrubMyCnty(%q) = %q, want %q", c.in, got, c.want) } } }