diff options
Diffstat (limited to 'test/suite/intl402/ch09/9.2/9.2.6_4.js')
-rw-r--r-- | test/suite/intl402/ch09/9.2/9.2.6_4.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/suite/intl402/ch09/9.2/9.2.6_4.js b/test/suite/intl402/ch09/9.2/9.2.6_4.js new file mode 100644 index 000000000..7c053a381 --- /dev/null +++ b/test/suite/intl402/ch09/9.2/9.2.6_4.js @@ -0,0 +1,23 @@ +// Copyright 2012 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @description Tests that LookupSupportedLocales returns an empty list when + * given an empty list. + * @author Norbert Lindenberg + */ + +$INCLUDE("testIntl.js"); + +testWithIntlConstructors(function (Constructor) { + // this test should work equally for both matching algorithms + ["lookup", "best fit"].forEach(function (matcher) { + var supported = Constructor.supportedLocalesOf([], {localeMatcher: matcher}); + if (supported.length !== 0) { + $ERROR("SupportedLocales with matcher " + matcher + " returned a non-empty list for an empty list."); + } + }); + + return true; +}); + |