Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Unified Diff: pkg/intl/test/find_default_locale_browser_test.dart

Issue 11878030: [ak] Fix tests to accept short locale names as well as long ones (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/intl/test/find_default_locale_standalone_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/test/find_default_locale_browser_test.dart
diff --git a/pkg/intl/test/find_default_locale_browser_test.dart b/pkg/intl/test/find_default_locale_browser_test.dart
index 51fdaf69b170440185237fa907c51ca9715193f9..e4d78fd0ae7f236ac8d6f292c426752eb16f5cc5 100644
--- a/pkg/intl/test/find_default_locale_browser_test.dart
+++ b/pkg/intl/test/find_default_locale_browser_test.dart
@@ -21,7 +21,11 @@ main() {
verifyLocale(_) {
expect(Intl.systemLocale, isNot(equals("xx_YY")));
+ // Allow either en_US or just en type locales. Windows in particular may
+ // give us just ru for ru_RU
var pattern = new RegExp(r"\w\w_[A-Z0-9]+");
+ var shortPattern = new RegExp(r"\w\w\");
var match = pattern.hasMatch(Intl.systemLocale);
- expect(match, isTrue);
+ var shortMatch = shortPattern.hasMatch(Intl.systemLocale);
+ expect(match || shortMatch, isTrue);
}
« no previous file with comments | « no previous file | pkg/intl/test/find_default_locale_standalone_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698