mirror of
https://github.com/warmbly/warmbly.git
synced 2026-11-28 08:05:45 +00:00
19 lines
532 B
Go
19 lines
532 B
Go
package tz
|
|
|
|
import "testing"
|
|
|
|
// The curated list is what the picker offers; a browser reports whatever zone
|
|
// the machine is in, and that has to be accepted too.
|
|
func TestValidAcceptsAnyIANAZone(t *testing.T) {
|
|
for _, name := range []string{"America/New_York", "Europe/Budapest", "America/Detroit", "UTC"} {
|
|
if !Valid(name) {
|
|
t.Errorf("Valid(%q) = false", name)
|
|
}
|
|
}
|
|
for _, name := range []string{"", "EST", "Mars/Olympus", "America/New York", "Local"} {
|
|
if Valid(name) {
|
|
t.Errorf("Valid(%q) = true", name)
|
|
}
|
|
}
|
|
}
|