]> Cypherpunks repositories - gostls13.git/commit
os/user: fix tests to pass on non-english Windows
authorOlivier Mengué <olivier.mengue@gmail.com>
Fri, 18 Jul 2025 10:36:00 +0000 (12:36 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Mon, 28 Jul 2025 18:52:39 +0000 (11:52 -0700)
commitf8eae7a3c33fcf9d31117b1a1a49a47b0343f811
treef7b83770e4cdba3a62c2c6ab1da9d43fc860fef8
parent098426447182a216991923d5bf95cdd3ae836e2c
os/user: fix tests to pass on non-english Windows

Tests on Windows are dependent on the english names of system accounts
and groups.

But on a french install of Windows the system accounts are:
- AUTORITE NT\Système
- AUTORITE NT\SERVICE LOCAL
- AUTORITE NT\SERVICE RÉSEAU

To allow the tests to pass on non-english Windows we only log
differences in user/group names if GetSystemDefaultLCID() reports
a non-english LCID, instead of failing.

Change-Id: Ib81acc2896c45675fa3faf5dc390b57ec5159689
Reviewed-on: https://go-review.googlesource.com/c/go/+/688715
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <mark@golang.org>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
src/os/user/user_windows_test.go