tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

supportedLocalesOf-locales-arg-empty-array.js (749B)


      1 // Copyright 2012 Mozilla Corporation. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 9.2.6_4
      6 description: >
      7    Tests that LookupSupportedLocales returns an empty list when
      8    given an empty list.
      9 author: Norbert Lindenberg
     10 includes: [testIntl.js]
     11 ---*/
     12 
     13 testWithIntlConstructors(function (Constructor) {
     14    // this test should work equally for both matching algorithms
     15    ["lookup", "best fit"].forEach(function (matcher) {
     16        var supported = Constructor.supportedLocalesOf([], {localeMatcher: matcher});
     17        assert.sameValue(supported.length, 0, "SupportedLocales with matcher " + matcher + " returned a non-empty list for an empty list.");
     18    });
     19 });
     20 
     21 reportCompare(0, 0);