package lookup

import "testing"

func TestTitleCase(t *testing.T) {
	cases := map[string]string{
		"NOEL CHENAVARD":        "Noel Chenavard",
		"VETRAZ-MONTHOUX":       "Vetraz-Monthoux",
		"o'brien":               "O'Brien",
		"866 ROUTE DES VOIRONS": "866 Route Des Voirons",
		"PARIS":                 "Paris",
		"":                      "",
		"  saint-étienne  ":     "Saint-Étienne",
		"JOHN":                  "John",
	}
	for in, want := range cases {
		if got := titleCase(in); got != want {
			t.Errorf("titleCase(%q) = %q, want %q", in, got, want)
		}
	}
}
