Test that a Swedish street is a street's name, and that Lexington and Ventura ship by their postal names

This commit is contained in:
2026-10-11 18:58:05 +02:00
committed by Lillem4n
parent 7eb95a0de1
commit 64e99927f5
+14 -1
View File
@@ -424,7 +424,8 @@ func TestShippedCapitalsAndBigPlaces(t *testing.T) {
for _, place := range []string{ for _, place := range []string{
"Albany, NY", "Augusta, ME", "Baton Rouge, LA", "Bismarck, ND", "Boise, ID", "Charleston, WV", "Albany, NY", "Augusta, ME", "Baton Rouge, LA", "Bismarck, ND", "Boise, ID", "Charleston, WV",
"Frankfort, KY", "Harrisburg, PA", "Helena, MT", "Juneau, AK", "Kansas City, KS", "Lafayette, LA", "Frankfort, KY", "Harrisburg, PA", "Helena, MT", "Juneau, AK", "Kansas City, KS", "Lafayette, LA",
"Montpelier, VT", "New Orleans, LA", "Pierre, SD", "St. Paul, MN", "Stockton, CA", "Lexington, KY", "Montpelier, VT", "New Orleans, LA", "Pierre, SD", "St. Paul, MN", "Stockton, CA",
"Ventura, CA",
} { } {
if !shipped[place] { if !shipped[place] {
t.Errorf("geo.US: no locality %s, want every state capital and place of 100,000 or more", place) t.Errorf("geo.US: no locality %s, want every state capital and place of 100,000 or more", place)
@@ -432,6 +433,18 @@ func TestShippedCapitalsAndBigPlaces(t *testing.T) {
} }
} }
func TestShippedSwedishStreetsAreStreetNames(t *testing.T) {
refused := map[string]bool{
"Färjeled Henriksdalsbryggan - Barnängsbryggan": true, "HÄLLSÄTTERSLEDEN": true, "Kärrs VSF": true,
"Länsväg 694": true, "NN": true, "tornslingan": true, "Öresundsvägen, Bondevägen": true,
}
for _, r := range geoRows(t, "SE", "street") {
if refused[r[0]] {
t.Errorf("geo.SE: street %q in %s, want no road number, ferry route, label, placeholder, two names or miscased name", r[0], r[1])
}
}
}
func geoTSV(t *testing.T, country, table string) string { func geoTSV(t *testing.T, country, table string) string {
b, err := os.ReadFile("data/geo/" + country + "/" + table + ".tsv") b, err := os.ReadFile("data/geo/" + country + "/" + table + ".tsv")
if err != nil { if err != nil {