Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | // Copyright 2012 Mozilla Corporation. All rights reserved. |
michael@0 | 2 | // This code is governed by the BSD license found in the LICENSE file. |
michael@0 | 3 | |
michael@0 | 4 | /** |
michael@0 | 5 | * @description Tests that LookupSupportedLocales returns an empty list when |
michael@0 | 6 | * given an empty list. |
michael@0 | 7 | * @author Norbert Lindenberg |
michael@0 | 8 | */ |
michael@0 | 9 | |
michael@0 | 10 | $INCLUDE("testIntl.js"); |
michael@0 | 11 | |
michael@0 | 12 | testWithIntlConstructors(function (Constructor) { |
michael@0 | 13 | // this test should work equally for both matching algorithms |
michael@0 | 14 | ["lookup", "best fit"].forEach(function (matcher) { |
michael@0 | 15 | var supported = Constructor.supportedLocalesOf([], {localeMatcher: matcher}); |
michael@0 | 16 | if (supported.length !== 0) { |
michael@0 | 17 | $ERROR("SupportedLocales with matcher " + matcher + " returned a non-empty list for an empty list."); |
michael@0 | 18 | } |
michael@0 | 19 | }); |
michael@0 | 20 | |
michael@0 | 21 | return true; |
michael@0 | 22 | }); |
michael@0 | 23 |