Commit a8f8d550 authored by Alex Brainman's avatar Alex Brainman Committed by Russ Cox

internal/syscall/windows/registry: adjust TestGetMUIStringValue

Do not check DaylightName if DynamicDaylightTimeDisabled is false.

Fixes #13502

Change-Id: I03e01ec0afdeb0037a5d3ee243674e5a6b559da5
Reviewed-on: https://go-review.googlesource.com/17998Reviewed-by: 's avatarYasuhiro MATSUMOTO <mattn.jp@gmail.com>
Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
parent ab096d58
......@@ -697,17 +697,19 @@ func TestGetMUIStringValue(t *testing.T) {
}
defer timezoneK.Close()
var tests = []struct {
key registry.Key
type testType struct {
name string
want string
}{
{key: timezoneK, name: "MUI_Std", want: syscall.UTF16ToString(dtzi.StandardName[:])},
{key: timezoneK, name: "MUI_Dlt", want: syscall.UTF16ToString(dtzi.DaylightName[:])},
}
var tests = []testType{
{"MUI_Std", syscall.UTF16ToString(dtzi.StandardName[:])},
}
if dtzi.DynamicDaylightTimeDisabled == 0 {
tests = append(tests, testType{"MUI_Dlt", syscall.UTF16ToString(dtzi.DaylightName[:])})
}
for _, test := range tests {
got, err := test.key.GetMUIStringValue(test.name)
got, err := timezoneK.GetMUIStringValue(test.name)
if err != nil {
t.Error("GetMUIStringValue:", err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment