mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
[test] Account for C.UTF-8 in locale test.
Change-Id: I9fda623aca715ac4209335676b30e4191e791c4b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350658 Reviewed-by: Brian Quinlan <bquinlan@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
7a9ea2f696
commit
b7e2327fe3
|
@ -8,12 +8,12 @@ import "package:expect/expect.dart";
|
|||
|
||||
main() {
|
||||
// Match patterns like:
|
||||
// "en" (MacOS)
|
||||
// "en-US" (Android, iOS, Windows)
|
||||
// "en_US", "en_US.UTF-8" (Linux)
|
||||
// "ESP-USA" (theoretically possible)
|
||||
// "en" (MacOS)
|
||||
// "en-US" (Android, iOS, Windows)
|
||||
// "en_US", "en_US.UTF-8", "C.UTF-8" (Linux)
|
||||
// "ESP-USA" (theoretically possible)
|
||||
// Assumes that the platform has a reasonably configured locale.
|
||||
var localePattern = RegExp(r"[A-Za-z]{2,4}([_-][A-Za-z]{2})?");
|
||||
var localePattern = RegExp(r"([A-Za-z]{2,4}([_-][A-Za-z]{2})?)|(C\.)");
|
||||
var localeName = Platform.localeName;
|
||||
Expect.isNotNull(
|
||||
localePattern.matchAsPrefix(localeName),
|
||||
|
|
Loading…
Reference in a new issue