Best JavaScript code snippet using karma
testdatetimefmt.js
Source:testdatetimefmt.js
1 /*2 * datetimefmt.js - test the date formatter template3 *4 * Copyright © 2019-2022, JEDLSoft5 *6 * Licensed under the Apache License, Version 2.0 (the "License");7 * you may not use this file except in compliance with the License.8 * You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing, software13 * distributed under the License is distributed on an "AS IS" BASIS,14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15 *16 * See the License for the specific language governing permissions and17 * limitations under the License.18 */19if (typeof(ilib) === "undefined") {20 var ilib = require("../../lib/ilib.js");21}22if (typeof(DateFmt) === "undefined") {23 var DateFmt = require("../../lib/DateFmt.js");24}25module.exports.testdatetimeformat = {26 setUp: function(callback) {27 ilib.clearCache();28 callback();29 },30 testDateTimeFormat_ar_EG: function(test) {31 test.expect(7);32 var result1, result2, result3, result4;33 result1 = new DateFmt({locale:"ar-EG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;34 result2 = new DateFmt({locale:"ar-EG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;35 result3 = new DateFmt({locale:"ar-EG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;36 result4 = new DateFmt({locale:"ar-EG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;37 test.equal(result1, "EEEEØ d MMMM yyyy"); // CLDR 34 change38 test.equal(result2, "EEEØ d MMMM yyyy");39 test.equal(result3, 'EEØ dd/MM/yyyy');40 test.equal(result4, 'EØ d/M/yyyy');41 result1 = new DateFmt({locale:"ar-EG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;42 result2 = new DateFmt({locale:"ar-EG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;43 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");44 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');45 result1 = new DateFmt({locale:"ar-EG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;46 test.equal(result1, "âh:mm:ss a z");47 test.done();48 },49 testDateTimeFormat_ar_IQ: function(test) {50 test.expect(7);51 var result1, result2, result3, result4;52 result1 = new DateFmt({locale:"ar-IQ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;53 result2 = new DateFmt({locale:"ar-IQ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;54 result3 = new DateFmt({locale:"ar-IQ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;55 result4 = new DateFmt({locale:"ar-IQ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;56 test.equal(result1, "EEEEØ d MMMM yyyy");57 test.equal(result2, "EEEØ d MMMM yyyy");58 test.equal(result3, 'EEØ dd/MM/yyyy');59 test.equal(result4, 'EØ d/M/yyyy');60 result1 = new DateFmt({locale:"ar-IQ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;61 result2 = new DateFmt({locale:"ar-IQ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;62 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");63 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');64 result1 = new DateFmt({locale:"ar-IQ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;65 test.equal(result1,"âh:mm:ss a z");66 test.done();67 },68 testDateTimeFormat_ar_MA: function(test) {69 test.expect(7);70 var result1, result2, result3, result4;71 result1 = new DateFmt({locale:"ar-MA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;72 result2 = new DateFmt({locale:"ar-MA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;73 result3 = new DateFmt({locale:"ar-MA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;74 result4 = new DateFmt({locale:"ar-MA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;75 test.equal(result1, "EEEEØ d MMMM yyyy");76 test.equal(result2, "EEEØ d MMMM yyyy");77 test.equal(result3, 'EEØ dd/MM/yyyy');78 test.equal(result4, 'EØ d/M/yyyy');79 result1 = new DateFmt({locale:"ar-MA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;80 result2 = new DateFmt({locale:"ar-MA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;81 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âHH:mm");82 test.equal(result2, 'EØ d/M/yyyy, âHH:mm');83 result1 = new DateFmt({locale:"ar-MA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;84 test.equal(result1,"âHH:mm:ss z");85 test.done();86 },87 testDateTimeFormat_as_IN: function(test) {88 test.expect(7);89 var result1, result2, result3, result4;90 result1 = new DateFmt({locale:"as-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;91 result2 = new DateFmt({locale:"as-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;92 result3 = new DateFmt({locale:"as-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;93 result4 = new DateFmt({locale:"as-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;94 //// CLDR 34 change ////95 test.equal(result1, "EEEE, d MMMM, yyyy");96 test.equal(result2, "EEE, d MMMM, yyyy");97 test.equal(result3, "EE, dd-MM-yyyy");98 test.equal(result4, "E, d-M-yyyy");99 result1 = new DateFmt({locale:"as-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;100 result2 = new DateFmt({locale:"as-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;101 test.equal(result1, "EEEE, d MMMM, yyyy a h.mm");102 test.equal(result2, "E, d-M-yyyy a h.mm");103 result1 = new DateFmt({locale:"as-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;;104 test.equal(result1, "a h.mm.ss z");105 test.done();106 },107 testDateTimeFormat_bg_BG: function(test) {108 test.expect(7);109 var result1, result2, result3, result4;110 result1 = new DateFmt({locale:"bg-BG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;111 result2 = new DateFmt({locale:"bg-BG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;112 result3 = new DateFmt({locale:"bg-BG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;113 result4 = new DateFmt({locale:"bg-BG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;114 test.equal(result1, "EEEE, d MMMM yyyy 'г'.");115 test.equal(result2, "EEE, d MMMM yyyy 'г'.");116 test.equal(result3, "EE, d.MM.yyyy 'г'.");117 test.equal(result4, "E, d.MM.yy 'г'.");118 result1 = new DateFmt({locale:"bg-BG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;119 result2 = new DateFmt({locale:"bg-BG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;120 test.equal(result1, 'EEEE, d MMMM yyyy \'г\'., H:mm \'Ñ\'.');121 test.equal(result2, 'E, d.MM.yy \'г\'., H:mm \'Ñ\'.');122 result1 = new DateFmt({locale:"bg-BG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;123 test.equal(result1, 'H:mm:ss \'Ñ\'. z');124 test.done();125 },126 testDateTimeFormat_bn_IN: function(test) {127 test.expect(7);128 var result1, result2, result3, result4;129 result1 = new DateFmt({locale:"bn-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;130 result2 = new DateFmt({locale:"bn-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;131 result3 = new DateFmt({locale:"bn-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;132 result4 = new DateFmt({locale:"bn-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;133 test.equal(result1, "EEEE, d MMMM, yyyy");134 test.equal(result2, "EEE, d MMMM, yyyy");135 test.equal(result3, "EE, d MMM, yyyy");136 test.equal(result4, "E, d/M/yy");137 result1 = new DateFmt({locale:"bn-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;138 result2 = new DateFmt({locale:"bn-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;139 test.equal(result1, "EEEE, d MMMM, yyyy h:mm a");140 test.equal(result2, "E, d/M/yy h:mm a");141 result1 = new DateFmt({locale:"bn-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;142 test.equal(result1, "h:mm:ss a z");143 test.done();144 },145 testDateTimeFormat_bs_Latn_BA: function(test) {146 test.expect(7);147 var result1, result2, result3, result4;148 result1 = new DateFmt({locale:"bs-Latn-BA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;149 result2 = new DateFmt({locale:"bs-Latn-BA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;150 result3 = new DateFmt({locale:"bs-Latn-BA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;151 result4 = new DateFmt({locale:"bs-Latn-BA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;152 test.equal(result1, "EEEE, d. MMMM yyyy.");153 test.equal(result2, "EEE, d. MMMM yyyy.");154 test.equal(result3, "EE, d. MMM yyyy."); // CLDR 34 change155 test.equal(result4, "E, d. M. yyyy."); // CLDR 34 change156 result1 = new DateFmt({locale:"bs-Latn-BA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;157 result2 = new DateFmt({locale:"bs-Latn-BA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;158 test.equal(result1, "EEEE, d. MMMM yyyy. 'u' HH:mm");159 test.equal(result2, "E, d. M. yyyy. HH:mm");160 result1 = new DateFmt({locale:"bs-Latn-BA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;161 test.equal(result1, "HH:mm:ss z");162 test.done();163 },164 testDateTimeFormat_bs_Latn_ME: function(test) {165 test.expect(7);166 var result1, result2, result3, result4;167 result1 = new DateFmt({locale:"bs-Latn-ME", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;168 result2 = new DateFmt({locale:"bs-Latn-ME", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;169 result3 = new DateFmt({locale:"bs-Latn-ME", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;170 result4 = new DateFmt({locale:"bs-Latn-ME", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;171 test.equal(result1, "EEEE, d. MMMM yyyy.");172 test.equal(result2, "EEE, d. MMMM yyyy.");173 test.equal(result3, "EE, d. MMM yyyy.");174 test.equal(result4, "E, d. M. yyyy.");175 result1 = new DateFmt({locale:"bs-Latn-ME", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;176 result2 = new DateFmt({locale:"bs-Latn-ME", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;177 test.equal(result1, "EEEE, d. MMMM yyyy. 'u' HH:mm");178 test.equal(result2, "E, d. M. yyyy. HH:mm");179 result1 = new DateFmt({locale:"bs-Latn-ME", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;180 test.equal(result1, "HH:mm:ss z");181 test.done();182 },183 testDateTimeFormat_cs_CZ: function(test) {184 test.expect(7);185 var result1, result2, result3, result4;186 result1 = new DateFmt({locale:"cs-CZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;187 result2 = new DateFmt({locale:"cs-CZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;188 result3 = new DateFmt({locale:"cs-CZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;189 result4 = new DateFmt({locale:"cs-CZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;190 test.equal(result1, "EEEE d. MMMM yyyy");191 test.equal(result2, "EEE d. MMMM yyyy");192 test.equal(result3, "EE d. M. yyyy");193 test.equal(result4, "E dd.MM.yy");194 result1 = new DateFmt({locale:"cs-CZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;195 result2 = new DateFmt({locale:"cs-CZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;196 test.equal(result1, "EEEE d. MMMM yyyy H:mm");197 test.equal(result2, "E dd.MM.yy H:mm");198 result1 = new DateFmt({locale:"cs-CZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;199 test.equal(result1, "H:mm:ss z");200 test.done();201 },202 testDateTimeFormat_da_DK: function(test) {203 test.expect(7);204 var result1, result2, result3, result4;205 result1 = new DateFmt({locale:"da-DK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;206 result2 = new DateFmt({locale:"da-DK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;207 result3 = new DateFmt({locale:"da-DK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;208 result4 = new DateFmt({locale:"da-DK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;209 test.equal(result1, "EEEE 'den' d. MMMM yyyy");210 test.equal(result2, "EEE 'den' d. MMMM yyyy"); // Bug211 test.equal(result3, "EE 'den' d. MMM yyyy"); //212 test.equal(result4, "E 'den' dd.MM.yyyy"); // CLDR 34 change213 result1 = new DateFmt({locale:"da-DK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;214 result2 = new DateFmt({locale:"da-DK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;215 test.equal(result1, "EEEE 'den' d. MMMM yyyy 'kl'. HH.mm");216 test.equal(result2, "E 'den' dd.MM.yyyy HH.mm");217 result1 = new DateFmt({locale:"da-DK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;218 test.equal(result1, "HH.mm.ss z");219 test.done();220 },221 testDateTimeFormat_de_AT: function(test) {222 test.expect(7);223 var result1, result2, result3, result4;224 result1 = new DateFmt({locale:"de-AT", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;225 result2 = new DateFmt({locale:"de-AT", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;226 result3 = new DateFmt({locale:"de-AT", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;227 result4 = new DateFmt({locale:"de-AT", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;228 test.equal(result1, "EEEE, d. MMMM yyyy");229 test.equal(result2, "EEE, d. MMMM yyyy");230 test.equal(result3, "EE, dd.MM.yyyy");231 test.equal(result4, "E, dd.MM.yy");232 result1 = new DateFmt({locale:"de-AT", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;233 result2 = new DateFmt({locale:"de-AT", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;234 test.equal(result1, "EEEE, d. MMMM yyyy 'um' HH:mm");235 test.equal(result2, "E, dd.MM.yy, HH:mm");236 result1 = new DateFmt({locale:"de-AT", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;237 test.equal(result1,"HH:mm:ss z");238 test.done();239 },240 testDateTimeFormat_de_CH: function(test) {241 test.expect(7);242 var result1, result2, result3, result4;243 result1 = new DateFmt({locale:"de-CH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;244 result2 = new DateFmt({locale:"de-CH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;245 result3 = new DateFmt({locale:"de-CH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;246 result4 = new DateFmt({locale:"de-CH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;247 test.equal(result1, "EEEE, d. MMMM yyyy");248 test.equal(result2, "EEE, d. MMMM yyyy");249 test.equal(result3, "EE, dd.MM.yyyy");250 test.equal(result4, "E, dd.MM.yy");251 result1 = new DateFmt({locale:"de-CH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;252 result2 = new DateFmt({locale:"de-CH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;253 test.equal(result1, "EEEE, d. MMMM yyyy 'um' HH:mm");254 test.equal(result2, "E, dd.MM.yy, HH:mm");255 result1 = new DateFmt({locale:"de-CH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;256 test.equal(result1,"HH:mm:ss z");257 test.done();258 },259 testDateTimeFormat_de_DE: function(test) {260 test.expect(7);261 var result1, result2, result3, result4;262 result1 = new DateFmt({locale:"de-DE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;263 result2 = new DateFmt({locale:"de-DE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;264 result3 = new DateFmt({locale:"de-DE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;265 result4 = new DateFmt({locale:"de-DE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;266 test.equal(result1, "EEEE, d. MMMM yyyy");267 test.equal(result2, "EEE, d. MMMM yyyy");268 test.equal(result3, "EE, dd.MM.yyyy");269 test.equal(result4, "E, dd.MM.yy");270 result1 = new DateFmt({locale:"de-DE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;271 result2 = new DateFmt({locale:"de-DE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;272 test.equal(result1, "EEEE, d. MMMM yyyy 'um' HH:mm");273 test.equal(result2, "E, dd.MM.yy, HH:mm");274 result1 = new DateFmt({locale:"de-DE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;275 test.equal(result1,"HH:mm:ss z");276 test.done();277 },278 testDateTimeFormat_de_LU: function(test) {279 test.expect(7);280 var result1, result2, result3, result4;281 result1 = new DateFmt({locale:"de-LU", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;282 result2 = new DateFmt({locale:"de-LU", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;283 result3 = new DateFmt({locale:"de-LU", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;284 result4 = new DateFmt({locale:"de-LU", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;285 test.equal(result1, "EEEE, d. MMMM yyyy");286 test.equal(result2, "EEE, d. MMMM yyyy");287 test.equal(result3, "EE, dd.MM.yyyy");288 test.equal(result4, "E, dd.MM.yy");289 result1 = new DateFmt({locale:"de-LU", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;290 result2 = new DateFmt({locale:"de-LU", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;291 test.equal(result1, "EEEE, d. MMMM yyyy 'um' HH:mm");292 test.equal(result2, "E, dd.MM.yy, HH:mm");293 result1 = new DateFmt({locale:"de-LU", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;294 test.equal(result1,"HH:mm:ss z");295 test.done();296 },297 testDateTimeFormat_el_CY: function(test) {298 test.expect(7);299 var result1, result2, result3, result4;300 result1 = new DateFmt({locale:"el-CY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;301 result2 = new DateFmt({locale:"el-CY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;302 result3 = new DateFmt({locale:"el-CY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;303 result4 = new DateFmt({locale:"el-CY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;304 test.equal(result1, "EEEE d MMMM yyyy");305 test.equal(result2, "EEE d MMMM yyyy");306 test.equal(result3, "EE d MMM yyyy");307 test.equal(result4, "E d/M/yy");308 result1 = new DateFmt({locale:"el-CY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;309 result2 = new DateFmt({locale:"el-CY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;310 test.equal(result1, "EEEE d MMMM yyyy - h:mm a");311 test.equal(result2, "E d/M/yy, h:mm a");312 result1 = new DateFmt({locale:"el-CY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;313 test.equal(result1, "h:mm:ss a z");314 test.done();315 },316 testDateTimeFormat_el_GR: function(test) {317 test.expect(7);318 var result1, result2, result3, result4;319 result1 = new DateFmt({locale:"el-GR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;320 result2 = new DateFmt({locale:"el-GR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;321 result3 = new DateFmt({locale:"el-GR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;322 result4 = new DateFmt({locale:"el-GR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;323 test.equal(result1, "EEEE d MMMM yyyy");324 test.equal(result2, "EEE d MMMM yyyy");325 test.equal(result3, "EE d MMM yyyy");326 test.equal(result4, "E d/M/yy");327 result1 = new DateFmt({locale:"el-GR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;328 result2 = new DateFmt({locale:"el-GR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;329 test.equal(result1, "EEEE d MMMM yyyy - h:mm a");330 test.equal(result2, "E d/M/yy, h:mm a");331 result1 = new DateFmt({locale:"el-GR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;332 test.equal(result1, "h:mm:ss a z");333 test.done();334 },335 testDateTimeFormat_en_AM: function(test) {336 test.expect(7);337 var result1, result2, result3, result4;338 result1 = new DateFmt({locale:"en-AM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;339 result2 = new DateFmt({locale:"en-AM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;340 result3 = new DateFmt({locale:"en-AM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;341 result4 = new DateFmt({locale:"en-AM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;342 test.equal(result1, "EEEE, MMMM d, yyyy");343 test.equal(result2, "EEE, MMMM d, yyyy");344 test.equal(result3, "EE, MMM d, yyyy");345 test.equal(result4, "E, M/d/yy");346 result1 = new DateFmt({locale:"en-AM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;347 result2 = new DateFmt({locale:"en-AM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;348 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");349 test.equal(result2, "E, M/d/yy, HH:mm");350 result1 = new DateFmt({locale:"en-AM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;351 test.equal(result1, "HH:mm:ss z");352 test.done();353 },354 testDateTimeFormat_en_AU: function(test) {355 test.expect(7);356 var result1, result2, result3, result4;357 result1 = new DateFmt({locale:"en-AU", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;358 result2 = new DateFmt({locale:"en-AU", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;359 result3 = new DateFmt({locale:"en-AU", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;360 result4 = new DateFmt({locale:"en-AU", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;361 test.equal(result1, "EEEE, d MMMM yyyy");362 test.equal(result2, "EEE, d MMMM yyyy");363 test.equal(result3, "EE, d MMM yyyy");364 test.equal(result4, "E, d/M/yy");365 result1 = new DateFmt({locale:"en-AU", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;366 result2 = new DateFmt({locale:"en-AU", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;367 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");368 test.equal(result2, "E, d/M/yy, h:mm a");369 result1 = new DateFmt({locale:"en-AU", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;370 test.equal(result1, "h:mm:ss a z");371 test.done();372 },373 testDateTimeFormat_en_AZ: function(test) {374 test.expect(7);375 var result1, result2, result3, result4;376 result1 = new DateFmt({locale:"en-AZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;377 result2 = new DateFmt({locale:"en-AZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;378 result3 = new DateFmt({locale:"en-AZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;379 result4 = new DateFmt({locale:"en-AZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;380 test.equal(result1, "EEEE, MMMM d, yyyy");381 test.equal(result2, "EEE, MMMM d, yyyy");382 test.equal(result3, "EE, MMM d, yyyy");383 test.equal(result4, "E, M/d/yy");384 result1 = new DateFmt({locale:"en-AZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;385 result2 = new DateFmt({locale:"en-AZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;386 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");387 test.equal(result2, "E, M/d/yy, HH:mm");388 result1 = new DateFmt({locale:"en-AZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;389 test.equal(result1, "HH:mm:ss z");390 test.done();391 },392 testDateTimeFormat_en_CA: function(test) {393 test.expect(7);394 var result1, result2, result3, result4;395 result1 = new DateFmt({locale:"en-CA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;396 result2 = new DateFmt({locale:"en-CA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;397 result3 = new DateFmt({locale:"en-CA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;398 result4 = new DateFmt({locale:"en-CA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;399 test.equal(result1, "EEEE, MMMM d, yyyy");400 test.equal(result2, "EEE, MMMM d, yyyy");401 test.equal(result3, "EE, MMM d, yyyy");402 test.equal(result4, "E, yyyy-MM-dd");403 result1 = new DateFmt({locale:"en-CA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;404 result2 = new DateFmt({locale:"en-CA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;405 test.equal(result1, "EEEE, MMMM d, yyyy 'at' h:mm a");406 test.equal(result2, "E, yyyy-MM-dd, h:mm a");407 result1 = new DateFmt({locale:"en-CA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;408 test.equal(result1, "h:mm:ss a z");409 test.done();410 },411 testDateTimeFormat_en_GB: function(test) {412 test.expect(7);413 var result1, result2, result3, result4;414 result1 = new DateFmt({locale:"en-GB", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;415 result2 = new DateFmt({locale:"en-GB", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;416 result3 = new DateFmt({locale:"en-GB", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;417 result4 = new DateFmt({locale:"en-GB", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;418 test.equal(result1, "EEEE, d MMMM yyyy");419 test.equal(result2, "EEE, d MMMM yyyy");420 test.equal(result3, "EE, d MMM yyyy");421 test.equal(result4, "E, dd/MM/yyyy");422 result1 = new DateFmt({locale:"en-GB", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;423 result2 = new DateFmt({locale:"en-GB", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;424 test.equal(result1, "EEEE, d MMMM yyyy 'at' HH:mm");425 test.equal(result2, "E, dd/MM/yyyy, HH:mm");426 result1 = new DateFmt({locale:"en-GB", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;427 test.equal(result1, "HH:mm:ss z");428 test.done();429 },430 testDateTimeFormat_en_GH: function(test) {431 test.expect(7);432 var result1, result2, result3, result4;433 result1 = new DateFmt({locale:"en-GH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;434 result2 = new DateFmt({locale:"en-GH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;435 result3 = new DateFmt({locale:"en-GH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;436 result4 = new DateFmt({locale:"en-GH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;437 test.equal(result1, "EEEE, d MMMM yyyy");438 test.equal(result2, "EEE, d MMMM yyyy");439 test.equal(result3, "EE, d MMM yyyy");440 test.equal(result4, "E, dd/MM/yyyy");441 result1 = new DateFmt({locale:"en-GH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;442 result2 = new DateFmt({locale:"en-GH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;443 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");444 test.equal(result2, "E, dd/MM/yyyy, h:mm a");445 result1 = new DateFmt({locale:"en-GH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;446 test.equal(result1, "h:mm:ss a z");447 test.done();448 },449 testDateTimeFormat_en_HK: function(test) {450 test.expect(7);451 var result1, result2, result3, result4;452 result1 = new DateFmt({locale:"en-HK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;453 result2 = new DateFmt({locale:"en-HK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;454 result3 = new DateFmt({locale:"en-HK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;455 result4 = new DateFmt({locale:"en-HK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;456 test.equal(result1, "EEEE, d MMMM yyyy");457 test.equal(result2, "EEE, d MMMM yyyy");458 test.equal(result3, "EE, d MMM yyyy");459 test.equal(result4, "E, d/M/yyyy");460 result1 = new DateFmt({locale:"en-HK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;461 result2 = new DateFmt({locale:"en-HK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;462 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");463 test.equal(result2, "E, d/M/yyyy, h:mm a");464 result1 = new DateFmt({locale:"en-HK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;465 test.equal(result1, "h:mm:ss a z");466 test.done();467 },468 testDateTimeFormat_en_IE: function(test) {469 test.expect(7);470 var result1, result2, result3, result4;471 result1 = new DateFmt({locale:"en-IE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;472 result2 = new DateFmt({locale:"en-IE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;473 result3 = new DateFmt({locale:"en-IE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;474 result4 = new DateFmt({locale:"en-IE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;475 test.equal(result1, "EEEE d MMMM yyyy");476 test.equal(result2, "EEE d MMMM yyyy");477 test.equal(result3, "EE d MMM yyyy");478 test.equal(result4, "E dd/MM/yyyy");479 result1 = new DateFmt({locale:"en-IE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;480 result2 = new DateFmt({locale:"en-IE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;481 test.equal(result1, "EEEE d MMMM yyyy 'at' HH:mm")482 test.equal(result2, "E dd/MM/yyyy, HH:mm");483 result1 = new DateFmt({locale:"en-IE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;484 test.equal(result1, "HH:mm:ss z");485 test.done();486 },487 testDateTimeFormat_en_IN: function(test) {488 test.expect(7);489 var result1, result2, result3, result4;490 result1 = new DateFmt({locale:"en-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;491 result2 = new DateFmt({locale:"en-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;492 result3 = new DateFmt({locale:"en-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;493 result4 = new DateFmt({locale:"en-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;494 test.equal(result1, "EEEE, d MMMM, yyyy");495 test.equal(result2, "EEE, d MMMM yyyy");496 test.equal(result3, "EE, dd-MMM-yyyy");497 test.equal(result4, "E, dd/MM/yy");498 result1 = new DateFmt({locale:"en-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;499 result2 = new DateFmt({locale:"en-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;500 test.equal(result1, "EEEE, d MMMM, yyyy 'at' h:mm a");501 test.equal(result2, "E, dd/MM/yy, h:mm a");502 result1 = new DateFmt({locale:"en-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;503 test.equal(result1, "h:mm:ss a z");504 test.done();505 },506 testDateTimeFormat_en_IS: function(test) {507 test.expect(7);508 var result1, result2, result3, result4;509 result1 = new DateFmt({locale:"en-IS", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;510 result2 = new DateFmt({locale:"en-IS", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;511 result3 = new DateFmt({locale:"en-IS", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;512 result4 = new DateFmt({locale:"en-IS", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;513 test.equal(result1, "EEEE, MMMM d, yyyy");514 test.equal(result2, "EEE, MMMM d, yyyy");515 test.equal(result3, "EE, MMM d, yyyy");516 test.equal(result4, "E, M/d/yy");517 result1 = new DateFmt({locale:"en-IS", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;518 result2 = new DateFmt({locale:"en-IS", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;519 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");520 test.equal(result2, "E, M/d/yy, HH:mm");521 result1 = new DateFmt({locale:"en-IS", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;522 test.equal(result1, "HH:mm:ss z");523 test.done();524 },525 testDateTimeFormat_en_JP: function(test) {526 test.expect(7);527 var result1, result2, result3, result4;528 result1 = new DateFmt({locale:"en-JP", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;529 result2 = new DateFmt({locale:"en-JP", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;530 result3 = new DateFmt({locale:"en-JP", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;531 result4 = new DateFmt({locale:"en-JP", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;532 test.equal(result1, "EEEE, MMMM d, yyyy");533 test.equal(result2, "EEE, MMMM d, yyyy");534 test.equal(result3, "EE, MMM d, yyyy");535 test.equal(result4, "E, M/d/yy");536 result1 = new DateFmt({locale:"en-JP", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;537 result2 = new DateFmt({locale:"en-JP", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;538 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");539 test.equal(result2, "E, M/d/yy, HH:mm");540 result1 = new DateFmt({locale:"en-JP", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;541 test.equal(result1, "HH:mm:ss z");542 test.done();543 },544 testDateTimeFormat_en_KE: function(test) {545 test.expect(7);546 var result1, result2, result3, result4;547 result1 = new DateFmt({locale:"en-KE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;548 result2 = new DateFmt({locale:"en-KE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;549 result3 = new DateFmt({locale:"en-KE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;550 result4 = new DateFmt({locale:"en-KE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;551 test.equal(result1, "EEEE, d MMMM yyyy");552 test.equal(result2, "EEE, d MMMM yyyy");553 test.equal(result3, "EE, d MMM yyyy");554 test.equal(result4, "E, dd/MM/yyyy");555 result1 = new DateFmt({locale:"en-KE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;556 result2 = new DateFmt({locale:"en-KE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;557 test.equal(result1, "EEEE, d MMMM yyyy 'at' HH:mm");558 test.equal(result2, "E, dd/MM/yyyy, HH:mm");559 result1 = new DateFmt({locale:"en-KE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;560 test.equal(result1, "HH:mm:ss z");561 test.done();562 },563 testDateTimeFormat_en_KR: function(test) {564 test.expect(7);565 var result1, result2, result3, result4;566 result1 = new DateFmt({locale:"en-KR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;567 result2 = new DateFmt({locale:"en-KR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;568 result3 = new DateFmt({locale:"en-KR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;569 result4 = new DateFmt({locale:"en-KR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;570 test.equal(result1, "EEEE, MMMM d, yyyy");571 test.equal(result2, "EEE, MMMM d, yyyy");572 test.equal(result3, "EE, MMM d, yyyy");573 test.equal(result4, "E, M/d/yy");574 result1 = new DateFmt({locale:"en-KR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;575 result2 = new DateFmt({locale:"en-KR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;576 test.equal(result1, "EEEE, MMMM d, yyyy 'at' h:mm a");577 test.equal(result2, "E, M/d/yy, h:mm a");578 result1 = new DateFmt({locale:"en-KR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;579 test.equal(result1, "h:mm:ss a z");580 test.done();581 },582 testDateTimeFormat_en_LK: function(test) {583 test.expect(7);584 var result1, result2, result3, result4;585 result1 = new DateFmt({locale:"en-LK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;586 result2 = new DateFmt({locale:"en-LK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;587 result3 = new DateFmt({locale:"en-LK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;588 result4 = new DateFmt({locale:"en-LK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;589 test.equal(result1, "EEEE, MMMM d, yyyy");590 test.equal(result2, "EEE, MMMM d, yyyy");591 test.equal(result3, "EE, MMM d, yyyy");592 test.equal(result4, "E, M/d/yy");593 result1 = new DateFmt({locale:"en-LK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;594 result2 = new DateFmt({locale:"en-LK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;595 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");596 test.equal(result2, "E, M/d/yy, HH:mm");597 result1 = new DateFmt({locale:"en-LK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;598 test.equal(result1, "HH:mm:ss z");599 test.done();600 },601 testDateTimeFormat_en_MM: function(test) {602 test.expect(7);603 var result1, result2, result3, result4;604 result1 = new DateFmt({locale:"en-MM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;605 result2 = new DateFmt({locale:"en-MM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;606 result3 = new DateFmt({locale:"en-MM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;607 result4 = new DateFmt({locale:"en-MM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;608 test.equal(result1, "EEEE, MMMM d, yyyy");609 test.equal(result2, "EEE, MMMM d, yyyy");610 test.equal(result3, "EE, MMM d, yyyy");611 test.equal(result4, "E, M/d/yy");612 result1 = new DateFmt({locale:"en-MM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;613 result2 = new DateFmt({locale:"en-MM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;614 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");615 test.equal(result2, "E, M/d/yy, HH:mm");616 result1 = new DateFmt({locale:"en-MM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;617 test.equal(result1, "HH:mm:ss z");618 test.done();619 },620 testDateTimeFormat_en_MW: function(test) {621 test.expect(7);622 var result1, result2, result3, result4;623 result1 = new DateFmt({locale:"en-MW", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;624 result2 = new DateFmt({locale:"en-MW", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;625 result3 = new DateFmt({locale:"en-MW", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;626 result4 = new DateFmt({locale:"en-MW", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;627 test.equal(result1, "EEEE, d MMMM yyyy");628 test.equal(result2, "EEE, d MMMM yyyy");629 test.equal(result3, "EE, d MMM yyyy");630 test.equal(result4, "E, dd/MM/yyyy");631 result1 = new DateFmt({locale:"en-MW", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;632 result2 = new DateFmt({locale:"en-MW", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;633 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a")634 test.equal(result2, "E, dd/MM/yyyy, h:mm a");635 result1 = new DateFmt({locale:"en-MW", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;636 test.equal(result1, "h:mm:ss a z");637 test.done();638 },639 testDateTimeFormat_en_MY: function(test) {640 test.expect(7);641 var result1, result2, result3, result4;642 result1 = new DateFmt({locale:"en-MY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;643 result2 = new DateFmt({locale:"en-MY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;644 result3 = new DateFmt({locale:"en-MY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;645 result4 = new DateFmt({locale:"en-MY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;646 test.equal(result1, "EEEE, d MMMM yyyy");647 test.equal(result2, "EEE, d MMMM yyyy");648 test.equal(result3, "EE, d MMM yyyy");649 test.equal(result4, "E, dd/MM/yyyy");650 result1 = new DateFmt({locale:"en-MY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;651 result2 = new DateFmt({locale:"en-MY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;652 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");653 test.equal(result2, "E, dd/MM/yyyy, h:mm a");654 result1 = new DateFmt({locale:"en-MY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;655 test.equal(result1, "h:mm:ss a z");656 test.done();657 },658 testDateTimeFormat_en_NG: function(test) {659 test.expect(7);660 var result1, result2, result3, result4;661 result1 = new DateFmt({locale:"en-NG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;662 result2 = new DateFmt({locale:"en-NG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;663 result3 = new DateFmt({locale:"en-NG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;664 result4 = new DateFmt({locale:"en-NG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;665 test.equal(result1, "EEEE, d MMMM yyyy");666 test.equal(result2, "EEE, d MMMM yyyy");667 test.equal(result3, "EE, d MMM yyyy");668 test.equal(result4, "E, dd/MM/yyyy");669 result1 = new DateFmt({locale:"en-NG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;670 result2 = new DateFmt({locale:"en-NG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;671 test.equal(result1, "EEEE, d MMMM yyyy 'at' HH:mm");672 test.equal(result2, "E, dd/MM/yyyy, HH:mm");673 result1 = new DateFmt({locale:"en-NG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;674 test.equal(result1, "HH:mm:ss z");675 test.done();676 },677 testDateTimeFormat_en_NZ: function(test) {678 test.expect(7);679 var result1, result2, result3, result4;680 result1 = new DateFmt({locale:"en-NZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;681 result2 = new DateFmt({locale:"en-NZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;682 result3 = new DateFmt({locale:"en-NZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;683 result4 = new DateFmt({locale:"en-NZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;684 test.equal(result1, "EEEE, d MMMM yyyy");685 test.equal(result2, "EEE, d MMMM yyyy");686 test.equal(result3, "EE, d/MM/yyyy");687 test.equal(result4, "E, d/MM/yy");688 result1 = new DateFmt({locale:"en-NZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;689 result2 = new DateFmt({locale:"en-NZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;690 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");691 test.equal(result2, "E, d/MM/yy, h:mm a");692 result1 = new DateFmt({locale:"en-NZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;693 test.equal(result1, "h:mm:ss a z");694 test.done();695 },696 testDateTimeFormat_en_PH: function(test) {697 test.expect(7);698 var result1, result2, result3, result4;699 result1 = new DateFmt({locale:"en-PH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;700 result2 = new DateFmt({locale:"en-PH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;701 result3 = new DateFmt({locale:"en-PH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;702 result4 = new DateFmt({locale:"en-PH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;703 test.equal(result1, "EEEE, MMMM d, yyyy");704 test.equal(result2, "EEE, MMMM d, yyyy");705 test.equal(result3, "EE, MMM d, yyyy");706 test.equal(result4, "E, M/d/yy");707 result1 = new DateFmt({locale:"en-PH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;708 result2 = new DateFmt({locale:"en-PH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;709 test.equal(result1, "EEEE, MMMM d, yyyy 'at' h:mm a");710 test.equal(result2, "E, M/d/yy, h:mm a");711 result1 = new DateFmt({locale:"en-PH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;712 test.equal(result1, "h:mm:ss a z");713 test.done();714 },715 testDateTimeFormat_en_PR: function(test) {716 test.expect(7);717 var result1, result2, result3, result4;718 result1 = new DateFmt({locale:"en-PR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;719 result2 = new DateFmt({locale:"en-PR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;720 result3 = new DateFmt({locale:"en-PR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;721 result4 = new DateFmt({locale:"en-PR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;722 test.equal(result1, "EEEE, MMMM d, yyyy");723 test.equal(result2, "EEE, MMMM d, yyyy");724 test.equal(result3, "EE, MMM d, yyyy");725 test.equal(result4, "E, M/d/yy");726 result1 = new DateFmt({locale:"en-PR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;727 result2 = new DateFmt({locale:"en-PR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;728 test.equal(result1, "EEEE, MMMM d, yyyy 'at' h:mm a");729 test.equal(result2, "E, M/d/yy, h:mm a");730 result1 = new DateFmt({locale:"en-PR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;731 test.equal(result1, "h:mm:ss a z");732 test.done();733 },734 testDateTimeFormat_en_SG: function(test) {735 test.expect(7);736 var result1, result2, result3, result4;737 result1 = new DateFmt({locale:"en-SG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;738 result2 = new DateFmt({locale:"en-SG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;739 result3 = new DateFmt({locale:"en-SG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;740 result4 = new DateFmt({locale:"en-SG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;741 test.equal(result1, "EEEE, d MMMM yyyy");742 test.equal(result2, "EEE, d MMMM yyyy");743 test.equal(result3, "EE, d MMM yyyy");744 test.equal(result4, "E, d/M/yy");745 result1 = new DateFmt({locale:"en-SG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;746 result2 = new DateFmt({locale:"en-SG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;747 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");748 test.equal(result2, "E, d/M/yy, h:mm a");749 result1 = new DateFmt({locale:"en-SG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;750 test.equal(result1, "h:mm:ss a z");751 test.done();752 },753 testDateTimeFormat_en_US: function(test) {754 test.expect(7);755 var result1, result2, result3, result4;756 result1 = new DateFmt({locale:"en-US", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;757 result2 = new DateFmt({locale:"en-US", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;758 result3 = new DateFmt({locale:"en-US", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;759 result4 = new DateFmt({locale:"en-US", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;760 test.equal(result1, "EEEE, MMMM d, yyyy");761 test.equal(result2, "EEE, MMMM d, yyyy");762 test.equal(result3, "EE, MMM d, yyyy");763 test.equal(result4, "E, M/d/yy");764 result1 = new DateFmt({locale:"en-US", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;765 result2 = new DateFmt({locale:"en-US", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;766 test.equal(result1, "EEEE, MMMM d, yyyy 'at' h:mm a");767 test.equal(result2, "E, M/d/yy, h:mm a");768 result1 = new DateFmt({locale:"en-US", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;769 test.equal(result1, "h:mm:ss a z");770 test.done();771 },772 testDateTimeFormat_en_UG: function(test) {773 test.expect(7);774 var result1, result2, result3, result4;775 result1 = new DateFmt({locale:"en-UG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;776 result2 = new DateFmt({locale:"en-UG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;777 result3 = new DateFmt({locale:"en-UG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;778 result4 = new DateFmt({locale:"en-UG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;779 test.equal(result1, "EEEE, d MMMM yyyy");780 test.equal(result2, "EEE, d MMMM yyyy");781 test.equal(result3, "EE, d MMM yyyy");782 test.equal(result4, "E, dd/MM/yyyy");783 result1 = new DateFmt({locale:"en-UG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;784 result2 = new DateFmt({locale:"en-UG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;785 test.equal(result1, "EEEE, d MMMM yyyy 'at' HH:mm");786 test.equal(result2, "E, dd/MM/yyyy, HH:mm");787 result1 = new DateFmt({locale:"en-UG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;788 test.equal(result1, "HH:mm:ss z");789 test.done();790 },791 testDateTimeFormat_en_ZA: function(test) {792 test.expect(7);793 var result1, result2, result3, result4;794 result1 = new DateFmt({locale:"en-ZA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;795 result2 = new DateFmt({locale:"en-ZA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;796 result3 = new DateFmt({locale:"en-ZA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;797 result4 = new DateFmt({locale:"en-ZA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;798 test.equal(result1, "EEEE, dd MMMM yyyy");799 test.equal(result2, "EEE, dd MMMM yyyy");800 test.equal(result3, "EE, dd MMM yyyy");801 test.equal(result4, "E, yyyy/MM/dd");802 result1 = new DateFmt({locale:"en-ZA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;803 result2 = new DateFmt({locale:"en-ZA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;804 test.equal(result1, "EEEE, dd MMMM yyyy 'at' HH:mm");805 test.equal(result2, "E, yyyy/MM/dd, HH:mm");806 result1 = new DateFmt({locale:"en-ZA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;807 test.equal(result1, "HH:mm:ss z");808 test.done();809 },810 testDateTimeFormat_en_ZM: function(test) {811 test.expect(7);812 var result1, result2, result3, result4;813 result1 = new DateFmt({locale:"en-ZM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;814 result2 = new DateFmt({locale:"en-ZM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;815 result3 = new DateFmt({locale:"en-ZM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;816 result4 = new DateFmt({locale:"en-ZM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;817 test.equal(result1, "EEEE, d MMMM yyyy");818 test.equal(result2, "EEE, d MMMM yyyy");819 test.equal(result3, "EE, d MMM yyyy");820 test.equal(result4, "E, dd/MM/yyyy");821 result1 = new DateFmt({locale:"en-ZM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;822 result2 = new DateFmt({locale:"en-ZM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;823 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");824 test.equal(result2, "E, dd/MM/yyyy, h:mm a");825 result1 = new DateFmt({locale:"en-ZM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;826 test.equal(result1, "h:mm:ss a z");827 test.done();828 },829 testDateTimeFormat_es_AR: function(test) {830 test.expect(7);831 var result1, result2, result3, result4;832 result1 = new DateFmt({locale:"es-AR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;833 result2 = new DateFmt({locale:"es-AR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;834 result3 = new DateFmt({locale:"es-AR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;835 result4 = new DateFmt({locale:"es-AR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;836 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");837 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");838 test.equal(result3, "EE, d MMM yyyy");839 test.equal(result4, "E, d/M/yy");840 result1 = new DateFmt({locale:"es-AR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;841 result2 = new DateFmt({locale:"es-AR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;842 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');843 test.equal(result2, "E, d/M/yy, HH:mm");844 result1 = new DateFmt({locale:"es-AR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;845 test.equal(result1, "HH:mm:ss z");846 test.done();847 },848 testDateTimeFormat_es_BO: function(test) {849 test.expect(7);850 var result1, result2, result3, result4;851 result1 = new DateFmt({locale:"es-BO", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;852 result2 = new DateFmt({locale:"es-BO", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;853 result3 = new DateFmt({locale:"es-BO", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;854 result4 = new DateFmt({locale:"es-BO", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;855 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");856 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");857 test.equal(result3, "EE, d MMM 'de' yyyy");858 test.equal(result4, "E, d/M/yy");859 result1 = new DateFmt({locale:"es-BO", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;860 result2 = new DateFmt({locale:"es-BO", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;861 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');862 test.equal(result2, "E, d/M/yy, HH:mm");863 result1 = new DateFmt({locale:"es-BO", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;864 test.equal(result1, "HH:mm:ss z");865 test.done();866 },867 testDateTimeFormat_es_CL: function(test) {868 test.expect(7);869 var result1, result2, result3, result4;870 result1 = new DateFmt({locale:"es-CL", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;871 result2 = new DateFmt({locale:"es-CL", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;872 result3 = new DateFmt({locale:"es-CL", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;873 result4 = new DateFmt({locale:"es-CL", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;874 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");875 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");876 test.equal(result3, "EE, dd-MM-yyyy");877 test.equal(result4, "E, dd-MM-yy");878 result1 = new DateFmt({locale:"es-CL", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;879 result2 = new DateFmt({locale:"es-CL", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;880 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');881 test.equal(result2, "E, dd-MM-yy, HH:mm");882 result1 = new DateFmt({locale:"es-CL", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;883 test.equal(result1, "HH:mm:ss z");884 test.done();885 },886 testDateTimeFormat_es_CO: function(test) {887 test.expect(7);888 var result1, result2, result3, result4;889 result1 = new DateFmt({locale:"es-CO", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;890 result2 = new DateFmt({locale:"es-CO", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;891 result3 = new DateFmt({locale:"es-CO", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;892 result4 = new DateFmt({locale:"es-CO", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;893 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");894 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");895 test.equal(result3, "EE, d/MM/yyyy");896 test.equal(result4, "E, d/MM/yy");897 result1 = new DateFmt({locale:"es-CO", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;898 result2 = new DateFmt({locale:"es-CO", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;899 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, h:mm a');900 test.equal(result2, "E, d/MM/yy, h:mm a");901 result1 = new DateFmt({locale:"es-CO", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;902 test.equal(result1, "h:mm:ss a z");903 test.done();904 },905 testDateTimeFormat_es_DO: function(test) {906 test.expect(7);907 var result1, result2, result3, result4;908 result1 = new DateFmt({locale:"es-DO", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;909 result2 = new DateFmt({locale:"es-DO", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;910 result3 = new DateFmt({locale:"es-DO", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;911 result4 = new DateFmt({locale:"es-DO", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;912 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");913 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");914 test.equal(result3, "EE, d MMM yyyy");915 test.equal(result4, "E, d/M/yy");916 result1 = new DateFmt({locale:"es-DO", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;917 result2 = new DateFmt({locale:"es-DO", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;918 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, h:mm a');919 test.equal(result2, "E, d/M/yy, h:mm a");920 result1 = new DateFmt({locale:"es-DO", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;921 test.equal(result1, "h:mm:ss a z");922 test.done();923 },924 testDateTimeFormat_es_EC: function(test) {925 test.expect(7);926 var result1, result2, result3, result4;927 result1 = new DateFmt({locale:"es-EC", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;928 result2 = new DateFmt({locale:"es-EC", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;929 result3 = new DateFmt({locale:"es-EC", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;930 result4 = new DateFmt({locale:"es-EC", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;931 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");932 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");933 test.equal(result3, "EE, d MMM yyyy");934 test.equal(result4, "E, d/M/yy");935 result1 = new DateFmt({locale:"es-EC", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;936 result2 = new DateFmt({locale:"es-EC", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;937 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');938 test.equal(result2, "E, d/M/yy, HH:mm");939 result1 = new DateFmt({locale:"es-EC", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;940 test.equal(result1, "HH:mm:ss z");941 test.done();942 },943 testDateTimeFormat_es_ES: function(test) {944 test.expect(7);945 var result1, result2, result3, result4;946 result1 = new DateFmt({locale:"es-ES", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;947 result2 = new DateFmt({locale:"es-ES", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;948 result3 = new DateFmt({locale:"es-ES", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;949 result4 = new DateFmt({locale:"es-ES", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;950 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");951 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");952 test.equal(result3, "EE, d MMM yyyy");953 test.equal(result4, "E, d/M/yy");954 result1 = new DateFmt({locale:"es-ES", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;955 result2 = new DateFmt({locale:"es-ES", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;956 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy, H:mm");957 test.equal(result2, "E, d/M/yy, H:mm");958 result1 = new DateFmt({locale:"es-ES", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;959 test.equal(result1, "H:mm:ss z");960 test.done();961 },962 testDateTimeFormat_es_GT: function(test) {963 test.expect(7);964 var result1, result2, result3, result4;965 result1 = new DateFmt({locale:"es-GT", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;966 result2 = new DateFmt({locale:"es-GT", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;967 result3 = new DateFmt({locale:"es-GT", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;968 result4 = new DateFmt({locale:"es-GT", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;969 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");970 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");971 test.equal(result3, "EE, d/MM/yyyy");972 test.equal(result4, "E, d/MM/yy");973 result1 = new DateFmt({locale:"es-GT", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;974 result2 = new DateFmt({locale:"es-GT", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;975 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');976 test.equal(result2, "E, d/MM/yy, HH:mm");977 result1 = new DateFmt({locale:"es-GT", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;978 test.equal(result1, "HH:mm:ss z");979 test.done();980 },981 testDateTimeFormat_es_HN: function(test) {982 test.expect(7);983 var result1, result2, result3, result4;984 result1 = new DateFmt({locale:"es-HN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;985 result2 = new DateFmt({locale:"es-HN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;986 result3 = new DateFmt({locale:"es-HN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;987 result4 = new DateFmt({locale:"es-HN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;988 test.equal(result1, "EEEE dd 'de' MMMM 'de' yyyy");989 test.equal(result2, "EEE dd 'de' MMMM 'de' yyyy");990 test.equal(result3, "EE d MMM yyyy");991 test.equal(result4, "E d/M/yy");992 result1 = new DateFmt({locale:"es-HN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;993 result2 = new DateFmt({locale:"es-HN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;994 test.equal(result1, 'EEEE dd \'de\' MMMM \'de\' yyyy, HH:mm');995 test.equal(result2, "E d/M/yy, HH:mm");996 result1 = new DateFmt({locale:"es-HN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;997 test.equal(result1, "HH:mm:ss z");998 test.done();999 },1000 testDateTimeFormat_es_MX: function(test) {1001 test.expect(7);1002 var result1, result2, result3, result4;1003 result1 = new DateFmt({locale:"es-MX", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1004 result2 = new DateFmt({locale:"es-MX", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1005 result3 = new DateFmt({locale:"es-MX", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1006 result4 = new DateFmt({locale:"es-MX", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1007 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1008 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1009 test.equal(result3, "EE, d MMM yyyy"); // CLDR 34 change1010 test.equal(result4, "E, dd/MM/yy");1011 result1 = new DateFmt({locale:"es-MX", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1012 result2 = new DateFmt({locale:"es-MX", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1013 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');1014 test.equal(result2, "E, dd/MM/yy, HH:mm");1015 result1 = new DateFmt({locale:"es-MX", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1016 test.equal(result1, "HH:mm:ss z");1017 test.done();1018 },1019 testDateTimeFormat_es_NI: function(test) {1020 test.expect(7);1021 var result1, result2, result3, result4;1022 result1 = new DateFmt({locale:"es-NI", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1023 result2 = new DateFmt({locale:"es-NI", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1024 result3 = new DateFmt({locale:"es-NI", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1025 result4 = new DateFmt({locale:"es-NI", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1026 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1027 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1028 test.equal(result3, "EE, d MMM yyyy");1029 test.equal(result4, "E, d/M/yy");1030 result1 = new DateFmt({locale:"es-NI", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1031 result2 = new DateFmt({locale:"es-NI", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1032 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');1033 test.equal(result2, "E, d/M/yy, HH:mm");1034 result1 = new DateFmt({locale:"es-NI", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1035 test.equal(result1, "HH:mm:ss z");1036 test.done();1037 },1038 testDateTimeFormat_es_PA: function(test) {1039 test.expect(7);1040 var result1, result2, result3, result4;1041 result1 = new DateFmt({locale:"es-PA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1042 result2 = new DateFmt({locale:"es-PA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1043 result3 = new DateFmt({locale:"es-PA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1044 result4 = new DateFmt({locale:"es-PA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1045 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1046 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1047 test.equal(result3, "EE, MM/dd/yyyy");1048 test.equal(result4, "E, MM/dd/yy");1049 result1 = new DateFmt({locale:"es-PA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1050 result2 = new DateFmt({locale:"es-PA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1051 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, h:mm a');1052 test.equal(result2, "E, MM/dd/yy, h:mm a");1053 result1 = new DateFmt({locale:"es-PA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1054 test.equal(result1, "h:mm:ss a z");1055 test.done();1056 },1057 testDateTimeFormat_es_PE: function(test) {1058 test.expect(7);1059 var result1, result2, result3, result4;1060 result1 = new DateFmt({locale:"es-PE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1061 result2 = new DateFmt({locale:"es-PE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1062 result3 = new DateFmt({locale:"es-PE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1063 result4 = new DateFmt({locale:"es-PE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1064 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1065 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1066 test.equal(result3, "EE, d MMM yyyy");1067 test.equal(result4, "E, d/MM/yy");1068 result1 = new DateFmt({locale:"es-PE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1069 result2 = new DateFmt({locale:"es-PE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1070 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');1071 test.equal(result2, "E, d/MM/yy, HH:mm");1072 result1 = new DateFmt({locale:"es-PE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1073 test.equal(result1, "HH:mm:ss z");1074 test.done();1075 },1076 testDateTimeFormat_es_PR: function(test) {1077 test.expect(7);1078 var result1, result2, result3, result4;1079 result1 = new DateFmt({locale:"es-PR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1080 result2 = new DateFmt({locale:"es-PR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1081 result3 = new DateFmt({locale:"es-PR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1082 result4 = new DateFmt({locale:"es-PR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1083 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1084 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1085 test.equal(result3, "EE, MM/dd/yyyy");1086 test.equal(result4, "E, MM/dd/yy");1087 result1 = new DateFmt({locale:"es-PR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1088 result2 = new DateFmt({locale:"es-PR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1089 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, h:mm a');1090 test.equal(result2, "E, MM/dd/yy, h:mm a");1091 result1 = new DateFmt({locale:"es-PR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1092 test.equal(result1, "h:mm:ss a z");1093 test.done();1094 },1095 testDateTimeFormat_es_PY: function(test) {1096 test.expect(7);1097 var result1, result2, result3, result4;1098 result1 = new DateFmt({locale:"es-PY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1099 result2 = new DateFmt({locale:"es-PY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1100 result3 = new DateFmt({locale:"es-PY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1101 result4 = new DateFmt({locale:"es-PY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1102 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1103 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1104 test.equal(result3, "EE, d MMM yyyy");1105 test.equal(result4, "E, d/M/yy");1106 result1 = new DateFmt({locale:"es-PY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1107 result2 = new DateFmt({locale:"es-PY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1108 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');1109 test.equal(result2, "E, d/M/yy, HH:mm");1110 result1 = new DateFmt({locale:"es-PY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1111 test.equal(result1, "HH:mm:ss z");1112 test.done();1113 },1114 testDateTimeFormat_es_SV: function(test) {1115 test.expect(7);1116 var result1, result2, result3, result4;1117 result1 = new DateFmt({locale:"es-SV", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1118 result2 = new DateFmt({locale:"es-SV", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1119 result3 = new DateFmt({locale:"es-SV", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1120 result4 = new DateFmt({locale:"es-SV", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1121 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1122 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1123 test.equal(result3, "EE, d MMM yyyy");1124 test.equal(result4, "E, d/M/yy");1125 result1 = new DateFmt({locale:"es-SV", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1126 result2 = new DateFmt({locale:"es-SV", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1127 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');1128 test.equal(result2, "E, d/M/yy, HH:mm");1129 result1 = new DateFmt({locale:"es-SV", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1130 test.equal(result1, "HH:mm:ss z");1131 test.done();1132 },1133 testDateTimeFormat_es_US: function(test) {1134 test.expect(7);1135 var result1, result2, result3, result4;1136 result1 = new DateFmt({locale:"es-US", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1137 result2 = new DateFmt({locale:"es-US", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1138 result3 = new DateFmt({locale:"es-US", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1139 result4 = new DateFmt({locale:"es-US", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1140 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1141 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1142 test.equal(result3, "EE, d MMM yyyy");1143 test.equal(result4, "E, d/M/yyyy"); // CLDR 34 change1144 result1 = new DateFmt({locale:"es-US", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1145 result2 = new DateFmt({locale:"es-US", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1146 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, h:mm a');1147 test.equal(result2, "E, d/M/yyyy, h:mm a");1148 result1 = new DateFmt({locale:"es-US", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1149 test.equal(result1, "h:mm:ss a z");1150 test.done();1151 },1152 testDateTimeFormat_es_UY: function(test) {1153 test.expect(7);1154 var result1, result2, result3, result4;1155 result1 = new DateFmt({locale:"es-UY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1156 result2 = new DateFmt({locale:"es-UY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1157 result3 = new DateFmt({locale:"es-UY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1158 result4 = new DateFmt({locale:"es-UY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1159 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1160 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1161 test.equal(result3, "EE, d MMM yyyy");1162 test.equal(result4, "E, d/M/yy");1163 result1 = new DateFmt({locale:"es-UY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1164 result2 = new DateFmt({locale:"es-UY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1165 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');1166 test.equal(result2, "E, d/M/yy, HH:mm");1167 result1 = new DateFmt({locale:"es-UY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1168 test.equal(result1, "HH:mm:ss z");1169 test.done();1170 },1171 testDateTimeFormat_es_VE: function(test) {1172 test.expect(7);1173 var result1, result2, result3, result4;1174 result1 = new DateFmt({locale:"es-VE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1175 result2 = new DateFmt({locale:"es-VE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1176 result3 = new DateFmt({locale:"es-VE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1177 result4 = new DateFmt({locale:"es-VE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1178 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1179 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1180 test.equal(result3, "EE, d MMM yyyy");1181 test.equal(result4, "E, d/M/yy");1182 result1 = new DateFmt({locale:"es-VE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1183 result2 = new DateFmt({locale:"es-VE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1184 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, h:mm a');1185 test.equal(result2, "E, d/M/yy, h:mm a");1186 result1 = new DateFmt({locale:"es-VE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1187 test.equal(result1, "h:mm:ss a z");1188 test.done();1189 },1190 testDateTimeFormat_et_EE: function(test) {1191 test.expect(7);1192 var result1, result2, result3, result4;1193 result1 = new DateFmt({locale:"et-EE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1194 result2 = new DateFmt({locale:"et-EE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1195 result3 = new DateFmt({locale:"et-EE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1196 result4 = new DateFmt({locale:"et-EE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1197 test.equal(result1, "EEEE, d. MMMM yyyy");1198 test.equal(result2, "EEE, d. MMMM yyyy");1199 test.equal(result3, "EE, d. MMM yyyy");1200 test.equal(result4, "E, dd.MM.yy");1201 result1 = new DateFmt({locale:"et-EE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1202 result2 = new DateFmt({locale:"et-EE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1203 test.equal(result1, "EEEE, d. MMMM yyyy HH:mm");1204 test.equal(result2, "E, dd.MM.yy HH:mm");1205 result1 = new DateFmt({locale:"et-EE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1206 test.equal(result1, "HH:mm:ss z");1207 test.done();1208 },1209 testDateTimeFormat_fa_AF: function(test) {1210 test.expect(7);1211 var result1, result2, result3, result4;1212 result1 = new DateFmt({locale:"fa-AF", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1213 result2 = new DateFmt({locale:"fa-AF", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1214 result3 = new DateFmt({locale:"fa-AF", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1215 result4 = new DateFmt({locale:"fa-AF", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1216 test.equal(result1, 'âyyyy MMMM d, EEEE');1217 test.equal(result2, 'âd MMMM yyyy, EEE');1218 test.equal(result3, 'âd MMM yyyy, EE');1219 test.equal(result4, 'âyyyy/M/d, E');1220 result1 = new DateFmt({locale:"fa-AF", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1221 result2 = new DateFmt({locale:"fa-AF", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1222 test.equal(result1, 'âyyyy MMMM d, EEEEØ Ø³Ø§Ø¹Øª âH:mm');1223 test.equal(result2, 'âyyyy/M/d, EØâ âH:mm');1224 result1 = new DateFmt({locale:"fa-AF", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1225 test.equal(result1, 'âH:mm:ss (z)');1226 test.done();1227 },1228 testDateTimeFormat_fa_IR: function(test) {1229 test.expect(7);1230 var result1, result2, result3, result4;1231 result1 = new DateFmt({locale:"fa-IR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1232 result2 = new DateFmt({locale:"fa-IR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1233 result3 = new DateFmt({locale:"fa-IR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1234 result4 = new DateFmt({locale:"fa-IR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1235 test.equal(result1, 'âyyyy MMMM d, EEEE');1236 test.equal(result2, 'âd MMMM yyyy, EEE');1237 test.equal(result3, 'âd MMM yyyy, EE');1238 test.equal(result4, 'âyyyy/M/d, E');1239 result1 = new DateFmt({locale:"fa-IR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1240 result2 = new DateFmt({locale:"fa-IR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1241 test.equal(result1, 'âyyyy MMMM d, EEEEØ Ø³Ø§Ø¹Øª âH:mm');1242 test.equal(result2, 'âyyyy/M/d, EØâ âH:mm');1243 result1 = new DateFmt({locale:"fa-IR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1244 test.equal(result1, 'âH:mm:ss (z)');1245 test.done();1246 },1247 testDateTimeFormat_fi_FI: function(test) {1248 test.expect(7);1249 var result1, result2, result3, result4;1250 result1 = new DateFmt({locale:"fi-FI", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1251 result2 = new DateFmt({locale:"fi-FI", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1252 result3 = new DateFmt({locale:"fi-FI", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1253 result4 = new DateFmt({locale:"fi-FI", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1254 test.equal(result1, "cccc d. MMMM yyyy");1255 test.equal(result2, "ccc d. MMMM yyyy");1256 test.equal(result3, "cc d.M.yyyy");1257 test.equal(result4, "c d.M.yyyy");1258 result1 = new DateFmt({locale:"fi-FI", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1259 result2 = new DateFmt({locale:"fi-FI", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1260 test.equal(result1, "cccc d. MMMM yyyy 'klo' H.mm");1261 test.equal(result2, "c d.M.yyyy H.mm");1262 result1 = new DateFmt({locale:"fi-FI", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1263 test.equal(result1, "H.mm.ss z");1264 test.done();1265 },1266 testDateTimeFormat_fr_BE: function(test) {1267 test.expect(7);1268 var result1, result2, result3, result4;1269 result1 = new DateFmt({locale:"fr-BE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1270 result2 = new DateFmt({locale:"fr-BE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1271 result3 = new DateFmt({locale:"fr-BE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1272 result4 = new DateFmt({locale:"fr-BE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1273 test.equal(result1, "EEEE d MMMM yyyy");1274 test.equal(result2, "EEE d MMMM yyyy");1275 test.equal(result3, "EE d MMM yyyy");1276 test.equal(result4, "E d/MM/yy");1277 result1 = new DateFmt({locale:"fr-BE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1278 result2 = new DateFmt({locale:"fr-BE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1279 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");1280 test.equal(result2, "E d/MM/yy HH:mm");1281 result1 = new DateFmt({locale:"fr-BE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1282 test.equal(result1, "HH:mm:ss z");1283 test.done();1284 },1285 testDateTimeFormat_fr_CA: function(test) {1286 test.expect(7);1287 var result1, result2, result3, result4;1288 result1 = new DateFmt({locale:"fr-CA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1289 result2 = new DateFmt({locale:"fr-CA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1290 result3 = new DateFmt({locale:"fr-CA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1291 result4 = new DateFmt({locale:"fr-CA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1292 test.equal(result1, "EEEE d MMMM yyyy");1293 test.equal(result2, "EEE d MMMM yyyy");1294 test.equal(result3, "EE d MMM yyyy");1295 test.equal(result4, 'E yyyy-MM-dd');1296 result1 = new DateFmt({locale:"fr-CA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1297 result2 = new DateFmt({locale:"fr-CA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1298 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH 'h' mm");1299 test.equal(result2, 'E yyyy-MM-dd HH \'h\' mm');1300 result1 = new DateFmt({locale:"fr-CA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1301 test.equal(result1, "HH 'h' mm 'min' ss 's' z");1302 test.done();1303 },1304 testDateTimeFormat_fr_CH: function(test) {1305 test.expect(7);1306 var result1, result2, result3, result4;1307 result1 = new DateFmt({locale:"fr-CH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1308 result2 = new DateFmt({locale:"fr-CH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1309 result3 = new DateFmt({locale:"fr-CH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1310 result4 = new DateFmt({locale:"fr-CH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1311 test.equal(result1, "EEEE, d MMMM yyyy");1312 test.equal(result2, "EEE, d MMMM yyyy");1313 test.equal(result3, "EE, d MMM yyyy");1314 test.equal(result4, "E, dd.MM.yy");1315 result1 = new DateFmt({locale:"fr-CH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1316 result2 = new DateFmt({locale:"fr-CH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1317 test.equal(result1, "EEEE, d MMMM yyyy 'à ' HH:mm");1318 test.equal(result2, "E, dd.MM.yy HH:mm");1319 result1 = new DateFmt({locale:"fr-CH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1320 test.equal(result1, "HH:mm:ss z");1321 test.done();1322 },1323 testDateTimeFormat_fr_FR: function(test) {1324 test.expect(7);1325 var result1, result2, result3, result4;1326 result1 = new DateFmt({locale:"fr-FR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1327 result2 = new DateFmt({locale:"fr-FR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1328 result3 = new DateFmt({locale:"fr-FR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1329 result4 = new DateFmt({locale:"fr-FR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1330 test.equal(result1, "EEEE d MMMM yyyy");1331 test.equal(result2, "EEE d MMMM yyyy");1332 test.equal(result3, "EE d MMM yyyy");1333 test.equal(result4, "E dd/MM/yyyy");1334 result1 = new DateFmt({locale:"fr-FR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1335 result2 = new DateFmt({locale:"fr-FR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1336 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");1337 test.equal(result2, "E dd/MM/yyyy HH:mm");1338 result1 = new DateFmt({locale:"fr-FR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1339 test.equal(result1, "HH:mm:ss z");1340 test.done();1341 },1342 testDateTimeFormat_fr_LU: function(test) {1343 test.expect(7);1344 var result1, result2, result3, result4;1345 result1 = new DateFmt({locale:"fr-LU", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1346 result2 = new DateFmt({locale:"fr-LU", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1347 result3 = new DateFmt({locale:"fr-LU", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1348 result4 = new DateFmt({locale:"fr-LU", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1349 test.equal(result1, "EEEE d MMMM yyyy");1350 test.equal(result2, "EEE d MMMM yyyy");1351 test.equal(result3, "EE d MMM yyyy");1352 test.equal(result4, "E dd/MM/yyyy");1353 result1 = new DateFmt({locale:"fr-LU", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1354 result2 = new DateFmt({locale:"fr-LU", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1355 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");1356 test.equal(result2,"E dd/MM/yyyy HH:mm");1357 result1 = new DateFmt({locale:"fr-LU", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1358 test.equal(result1, "HH:mm:ss z");1359 test.done();1360 },1361 testDateTimeFormat_ga_IE: function(test) {1362 test.expect(7);1363 var result1, result2, result3, result4;1364 result1 = new DateFmt({locale:"ga-IE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1365 result2 = new DateFmt({locale:"ga-IE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1366 result3 = new DateFmt({locale:"ga-IE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1367 result4 = new DateFmt({locale:"ga-IE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1368 test.equal(result1, "EEEE d MMMM yyyy");1369 test.equal(result2, "EEE d MMMM yyyy");1370 test.equal(result3, "EE d MMM yyyy");1371 test.equal(result4, "E dd/MM/yyyy");1372 result1 = new DateFmt({locale:"ga-IE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1373 result2 = new DateFmt({locale:"ga-IE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1374 test.equal(result1, "EEEE d MMMM yyyy HH:mm");1375 test.equal(result2, "E dd/MM/yyyy HH:mm");1376 result1 = new DateFmt({locale:"ga-IE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1377 test.equal(result1, "HH:mm:ss z");1378 test.done();1379 },1380 testDateTimeFormat_gu_IN: function(test) {1381 test.expect(7);1382 var result1, result2, result3, result4;1383 result1 = new DateFmt({locale:"gu-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1384 result2 = new DateFmt({locale:"gu-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1385 result3 = new DateFmt({locale:"gu-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1386 result4 = new DateFmt({locale:"gu-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1387 test.equal(result1, "EEEE, d MMMM, yyyy");1388 test.equal(result2, "EEE, d MMMM, yyyy");1389 test.equal(result3, "EE, d MMM, yyyy");1390 test.equal(result4, "E, d/M/yy");1391 result1 = new DateFmt({locale:"gu-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1392 result2 = new DateFmt({locale:"gu-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1393 test.equal(result1, "EEEE, d MMMM, yyyy ઠhh:mm a વાàªà«àª¯à«"); // CLDR 34 change1394 test.equal(result2, "E, d/M/yy hh:mm a");1395 result1 = new DateFmt({locale:"gu-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1396 test.equal(result1, "hh:mm:ss a z");1397 test.done();1398 },1399 testDateTimeFormat_he_IL: function(test) {1400 test.expect(7);1401 var result1, result2, result3, result4;1402 result1 = new DateFmt({locale:"he-IL", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1403 result2 = new DateFmt({locale:"he-IL", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1404 result3 = new DateFmt({locale:"he-IL", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1405 result4 = new DateFmt({locale:"he-IL", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1406 test.equal(result1, 'EEEE, d ×MMMM yyyy');1407 test.equal(result2, 'EEE, d ×MMMM yyyy');1408 test.equal(result3, 'EE, d ×MMM yyyy');1409 test.equal(result4, 'E, d.M.yyyy');1410 result1 = new DateFmt({locale:"he-IL", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1411 result2 = new DateFmt({locale:"he-IL", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1412 test.equal(result1, 'EEEE, d ×MMMM yyyy ××©×¢× âH:mm');1413 test.equal(result2, 'E, d.M.yyyy, âH:mm');1414 result1 = new DateFmt({locale:"he-IL", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1415 test.equal(result1, 'âH:mm:ss z');1416 test.done();1417 },1418 testDateTimeFormat_hi_IN: function(test) {1419 test.expect(7);1420 var result1, result2, result3, result4;1421 result1 = new DateFmt({locale:"hi-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1422 result2 = new DateFmt({locale:"hi-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1423 result3 = new DateFmt({locale:"hi-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1424 result4 = new DateFmt({locale:"hi-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1425 test.equal(result1, "EEEE, d MMMM yyyy");1426 test.equal(result2, "EEE, d MMMM yyyy");1427 test.equal(result3, "EE, d MMM yyyy");1428 test.equal(result4, "E, d/M/yy");1429 result1 = new DateFmt({locale:"hi-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1430 result2 = new DateFmt({locale:"hi-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1431 test.equal(result1, "EEEE, d MMMM yyyy à¤à¥ h:mm a");1432 test.equal(result2, "E, d/M/yy, h:mm a");1433 result1 = new DateFmt({locale:"hi-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1434 test.equal(result1, "h:mm:ss a z");1435 test.done();1436 },1437 testDateTimeFormat_hr_HR: function(test) {1438 test.expect(7);1439 var result1, result2, result3, result4;1440 result1 = new DateFmt({locale:"hr-HR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1441 result2 = new DateFmt({locale:"hr-HR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1442 result3 = new DateFmt({locale:"hr-HR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1443 result4 = new DateFmt({locale:"hr-HR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1444 test.equal(result1, "EEEE, d. MMMM yyyy.");1445 test.equal(result2, "EEE, d. MMMM yyyy.");1446 test.equal(result3, "EE, d. MMM yyyy.");1447 test.equal(result4, "E, dd. MM. yyyy.");1448 result1 = new DateFmt({locale:"hr-HR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1449 result2 = new DateFmt({locale:"hr-HR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1450 test.equal(result1, "EEEE, d. MMMM yyyy. 'u' HH:mm");1451 test.equal(result2, "E, dd. MM. yyyy. HH:mm");1452 result1 = new DateFmt({locale:"hr-HR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1453 test.equal(result1, "HH:mm:ss z");1454 test.done();1455 },1456 testDateTimeFormat_hr_ME: function(test) {1457 test.expect(7);1458 var result1, result2, result3, result4;1459 result1 = new DateFmt({locale:"hr-ME", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1460 result2 = new DateFmt({locale:"hr-ME", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1461 result3 = new DateFmt({locale:"hr-ME", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1462 result4 = new DateFmt({locale:"hr-ME", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1463 test.equal(result1, "EEEE, d. MMMM yyyy.");1464 test.equal(result2, "EEE, d. MMMM yyyy.");1465 test.equal(result3, "EE, d. MMM yyyy.");1466 test.equal(result4, "E, dd. MM. yyyy.");1467 result1 = new DateFmt({locale:"hr-ME", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1468 result2 = new DateFmt({locale:"hr-ME", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1469 test.equal(result1, "EEEE, d. MMMM yyyy. 'u' HH:mm");1470 test.equal(result2, "E, dd. MM. yyyy. HH:mm");1471 result1 = new DateFmt({locale:"hr-ME", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1472 test.equal(result1, "HH:mm:ss z");1473 test.done();1474 },1475 testDateTimeFormat_hr_HU: function(test) {1476 test.expect(7);1477 var result1, result2, result3, result4;1478 result1 = new DateFmt({locale:"hr-HU", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1479 result2 = new DateFmt({locale:"hr-HU", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1480 result3 = new DateFmt({locale:"hr-HU", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1481 result4 = new DateFmt({locale:"hr-HU", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1482 test.equal(result1, "EEEE, d. MMMM yyyy.");1483 test.equal(result2, "EEE, d. MMMM yyyy.");1484 test.equal(result3, "EE, d. MMM yyyy.");1485 test.equal(result4, "E, dd. MM. yyyy.");1486 result1 = new DateFmt({locale:"hr-HU", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1487 result2 = new DateFmt({locale:"hr-HU", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1488 test.equal(result1, "EEEE, d. MMMM yyyy. 'u' HH:mm");1489 test.equal(result2, "E, dd. MM. yyyy. HH:mm");1490 result1 = new DateFmt({locale:"hr-HU", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1491 test.equal(result1, "HH:mm:ss z");1492 test.done();1493 },1494 testDateTimeFormat_id_ID: function(test) {1495 test.expect(7);1496 var result1, result2, result3, result4;1497 result1 = new DateFmt({locale:"id-ID", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1498 result2 = new DateFmt({locale:"id-ID", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1499 result3 = new DateFmt({locale:"id-ID", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1500 result4 = new DateFmt({locale:"id-ID", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1501 test.equal(result1, "EEEE, dd MMMM yyyy");1502 test.equal(result2, "EEE, d MMMM yyyy");1503 test.equal(result3, "EE, d MMM yyyy");1504 test.equal(result4, "E, dd/MM/yy");1505 result1 = new DateFmt({locale:"id-ID", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1506 result2 = new DateFmt({locale:"id-ID", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1507 test.equal(result1, "EEEE, dd MMMM yyyy HH.mm");1508 test.equal(result2, "E, dd/MM/yy HH.mm");1509 result1 = new DateFmt({locale:"id-ID", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1510 test.equal(result1, "HH.mm.ss z");1511 test.done();1512 },1513 testDateTimeFormat_is_IS: function(test) {1514 test.expect(7);1515 var result1, result2, result3, result4;1516 result1 = new DateFmt({locale:"is-IS", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1517 result2 = new DateFmt({locale:"is-IS", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1518 result3 = new DateFmt({locale:"is-IS", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1519 result4 = new DateFmt({locale:"is-IS", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1520 test.equal(result1, "EEEE, d. MMMM yyyy");1521 test.equal(result2, "EEE, d. MMMM yyyy");1522 test.equal(result3, "EE, d. MMM yyyy");1523 test.equal(result4, "E, d.M.yyyy");1524 result1 = new DateFmt({locale:"is-IS", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1525 result2 = new DateFmt({locale:"is-IS", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1526 test.equal(result1, "EEEE, d. MMMM yyyy 'kl'. HH:mm");1527 test.equal(result2, "E, d.M.yyyy, HH:mm");1528 result1 = new DateFmt({locale:"is-IS", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1529 test.equal(result1, "HH:mm:ss z");1530 test.done();1531 },1532 testDateTimeFormat_it_CH: function(test) {1533 test.expect(7);1534 var result1, result2, result3, result4;1535 result1 = new DateFmt({locale:"it-CH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1536 result2 = new DateFmt({locale:"it-CH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1537 result3 = new DateFmt({locale:"it-CH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1538 result4 = new DateFmt({locale:"it-CH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1539 test.equal(result1, "EEEE, d MMMM yyyy");1540 test.equal(result2, "EEE, d MMMM yyyy");1541 test.equal(result3, "EE, d MMM yyyy");1542 test.equal(result4, "E, dd.MM.yy");1543 result1 = new DateFmt({locale:"it-CH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1544 result2 = new DateFmt({locale:"it-CH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1545 test.equal(result1, "EEEE, d MMMM yyyy HH:mm");1546 test.equal(result2, "E, dd.MM.yy, HH:mm");1547 result1 = new DateFmt({locale:"it-CH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1548 test.equal(result1, "HH:mm:ss z");1549 test.done();1550 },1551 testDateTimeFormat_it_IT: function(test) {1552 test.expect(7);1553 var result1, result2, result3, result4;1554 result1 = new DateFmt({locale:"it-IT", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1555 result2 = new DateFmt({locale:"it-IT", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1556 result3 = new DateFmt({locale:"it-IT", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1557 result4 = new DateFmt({locale:"it-IT", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1558 test.equal(result1, "EEEE d MMMM yyyy");1559 test.equal(result2, "EEE d MMMM yyyy");1560 test.equal(result3, "EE d MMM yyyy");1561 test.equal(result4, "E dd/MM/yy");1562 result1 = new DateFmt({locale:"it-IT", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1563 result2 = new DateFmt({locale:"it-IT", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1564 test.equal(result1, "EEEE d MMMM yyyy HH:mm");1565 test.equal(result2, "E dd/MM/yy, HH:mm");1566 result1 = new DateFmt({locale:"it-IT", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1567 test.equal(result1, "HH:mm:ss z");1568 test.done();1569 },1570 testDateTimeFormat_ja_JP: function(test) {1571 test.expect(7);1572 var result1, result2, result3, result4;1573 result1 = new DateFmt({locale:"ja-JP", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1574 result2 = new DateFmt({locale:"ja-JP", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1575 result3 = new DateFmt({locale:"ja-JP", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1576 result4 = new DateFmt({locale:"ja-JP", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1577 test.equal(result1, "yyyyå¹´Mædæ¥EEEE");1578 test.equal(result2, "yyyyå¹´Mædæ¥EEE");1579 test.equal(result3, "yyyy/MM/ddEE");1580 test.equal(result4, "yyyy/MM/ddE");1581 result1 = new DateFmt({locale:"ja-JP", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1582 result2 = new DateFmt({locale:"ja-JP", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1583 test.equal(result1, "yyyyå¹´Mædæ¥EEEE H:mm");1584 test.equal(result2, "yyyy/MM/ddE H:mm");1585 result1 = new DateFmt({locale:"ja-JP", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1586 test.equal(result1, "H:mm:ss z");1587 test.done();1588 },1589 testDateTimeFormat_kk_KZ: function(test) {1590 test.expect(7);1591 var result1, result2, result3, result4;1592 result1 = new DateFmt({locale:"kk-KZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1593 result2 = new DateFmt({locale:"kk-KZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1594 result3 = new DateFmt({locale:"kk-KZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1595 result4 = new DateFmt({locale:"kk-KZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1596 test.equal(result1, "yyyy 'ж'. d MMMM, EEEE");1597 test.equal(result2, "yyyy 'ж'. d MMMM, EEE");1598 test.equal(result3, "yyyy 'ж'. dd MMM, EE");1599 test.equal(result4, "dd.MM.yy, E");1600 result1 = new DateFmt({locale:"kk-KZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1601 result2 = new DateFmt({locale:"kk-KZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1602 test.equal(result1, "yyyy 'ж'. d MMMM, EEEE, HH:mm");1603 test.equal(result2, "dd.MM.yy, E, HH:mm");1604 result1 = new DateFmt({locale:"kk-KZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1605 test.equal(result1, "HH:mm:ss z");1606 test.done();1607 },1608 testDateTimeFormat_kn_IN: function(test) {1609 test.expect(7);1610 var result1, result2, result3, result4;1611 result1 = new DateFmt({locale:"kn-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1612 result2 = new DateFmt({locale:"kn-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1613 result3 = new DateFmt({locale:"kn-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1614 result4 = new DateFmt({locale:"kn-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1615 test.equal(result1, "EEEE, MMMM d, yyyy");1616 test.equal(result2, "EEE, MMMM d, yyyy");1617 test.equal(result3, "EE, MMM d, yyyy");1618 test.equal(result4, "E, d/M/yy");1619 result1 = new DateFmt({locale:"kn-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1620 result2 = new DateFmt({locale:"kn-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1621 test.equal(result1, "EEEE, MMMM d, yyyy hh:mm a");1622 test.equal(result2, "E, d/M/yy hh:mm a");1623 result1 = new DateFmt({locale:"kn-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1624 test.equal(result1, "hh:mm:ss a z");1625 test.done();1626 },1627 testDateTimeFormat_ko_KR: function(test) {1628 test.expect(7);1629 var result1, result2, result3, result4;1630 result1 = new DateFmt({locale:"ko-KR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1631 result2 = new DateFmt({locale:"ko-KR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1632 result3 = new DateFmt({locale:"ko-KR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1633 result4 = new DateFmt({locale:"ko-KR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1634 test.equal(result1, "yyyyë
Mì dì¼ EEEE");1635 test.equal(result2, "yyyyë
Mì dì¼ EEE");1636 test.equal(result3, "yyyy. M. d. EE");1637 test.equal(result4, "yy. M. d. E");1638 result1 = new DateFmt({locale:"ko-KR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1639 result2 = new DateFmt({locale:"ko-KR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1640 test.equal(result1, "yyyyë
Mì dì¼ EEEE a h:mm");1641 test.equal(result2, "yy. M. d. E a h:mm");1642 result1 = new DateFmt({locale:"ko-KR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1643 test.equal(result1, "a h:mm:ss z");1644 test.done();1645 },1646 testDateTimeFormat_ku_IQ: function(test) {1647 test.expect(7);1648 var result1, result2, result3, result4;1649 result1 = new DateFmt({locale:"ku-IQ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1650 result2 = new DateFmt({locale:"ku-IQ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1651 result3 = new DateFmt({locale:"ku-IQ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1652 result4 = new DateFmt({locale:"ku-IQ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1653 test.equal(result1, 'âyyyy MMMM d, EEEE');1654 test.equal(result2, 'âdÛ MMMMÛ yyyy, EEE');1655 test.equal(result3, 'âyyyy MMM d, EE');1656 test.equal(result4, 'âyyyy-MM-dd, E');1657 result1 = new DateFmt({locale:"ku-IQ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1658 result2 = new DateFmt({locale:"ku-IQ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1659 test.equal(result1, 'âyyyy MMMM d, EEEE âh:mm a');1660 test.equal(result2, 'âyyyy-MM-dd, E âh:mm a');1661 result1 = new DateFmt({locale:"ku-IQ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1662 test.equal(result1, 'âh:mm:ss a z');1663 test.done();1664 },1665 testDateTimeFormat_lt_LT: function(test) {1666 test.expect(7);1667 var result1, result2, result3, result4;1668 result1 = new DateFmt({locale:"lt-LT", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1669 result2 = new DateFmt({locale:"lt-LT", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1670 result3 = new DateFmt({locale:"lt-LT", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1671 result4 = new DateFmt({locale:"lt-LT", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1672 test.equal(result1, "yyyy 'm'. MMMM d 'd'., EEEE");1673 test.equal(result2, "yyyy 'm'. MMMM d 'd'., EEE");1674 test.equal(result3, "yyyy-MM-dd, EE");1675 test.equal(result4, "yyyy-MM-dd, E");1676 result1 = new DateFmt({locale:"lt-LT", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1677 result2 = new DateFmt({locale:"lt-LT", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1678 test.equal(result1, "yyyy 'm'. MMMM d 'd'., EEEE HH:mm");1679 test.equal(result2, "yyyy-MM-dd, E HH:mm");1680 result1 = new DateFmt({locale:"lt-LT", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1681 test.equal(result1, "HH:mm:ss z");1682 test.done();1683 },1684 testDateTimeFormat_lv_LV: function(test) {1685 test.expect(7);1686 var result1, result2, result3, result4;1687 result1 = new DateFmt({locale:"lv-LV", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1688 result2 = new DateFmt({locale:"lv-LV", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1689 result3 = new DateFmt({locale:"lv-LV", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1690 result4 = new DateFmt({locale:"lv-LV", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1691 test.equal(result1, "EEEE, yyyy. 'gada' d. MMMM");1692 test.equal(result2, "EEE, yyyy. 'gada' d. MMMM");1693 test.equal(result3, "EE, yyyy. 'gada' d. MMM");1694 test.equal(result4, "E, dd.MM.yy");1695 result1 = new DateFmt({locale:"lv-LV", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1696 result2 = new DateFmt({locale:"lv-LV", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1697 test.equal(result1, "EEEE, yyyy. 'gada' d. MMMM HH:mm");1698 test.equal(result2, "E, dd.MM.yy HH:mm");1699 result1 = new DateFmt({locale:"lv-LV", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1700 test.equal(result1, "HH:mm:ss z");1701 test.done();1702 },1703 testDateTimeFormat_mk_MK: function(test) {1704 test.expect(7);1705 var result1, result2, result3, result4;1706 result1 = new DateFmt({locale:"mk-MK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1707 result2 = new DateFmt({locale:"mk-MK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1708 result3 = new DateFmt({locale:"mk-MK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1709 result4 = new DateFmt({locale:"mk-MK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1710 test.equal(result1, 'EEEE, d MMMM yyyy');1711 test.equal(result2, 'EEE, d MMMM yyyy');1712 test.equal(result3, 'EE, d.M.yyyy');1713 test.equal(result4, 'E, d.M.yy');1714 result1 = new DateFmt({locale:"mk-MK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1715 result2 = new DateFmt({locale:"mk-MK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1716 test.equal(result1, 'EEEE, d MMMM yyyy, \'во\' HH:mm');1717 test.equal(result2, 'E, d.M.yy, \'во\' HH:mm');1718 result1 = new DateFmt({locale:"mk-MK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1719 test.equal(result1, "HH:mm:ss z");1720 test.done();1721 },1722 testDateTimeFormat_ml_IN: function(test) {1723 test.expect(7);1724 var result1, result2, result3, result4;1725 result1 = new DateFmt({locale:"ml-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1726 result2 = new DateFmt({locale:"ml-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1727 result3 = new DateFmt({locale:"ml-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1728 result4 = new DateFmt({locale:"ml-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1729 test.equal(result1, "yyyy, MMMM d, EEEE");1730 test.equal(result2, "yyyy, MMMM d, EEE");1731 test.equal(result3, "yyyy, MMM d, EE");1732 test.equal(result4, "d/M/yy, E");1733 result1 = new DateFmt({locale:"ml-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1734 result2 = new DateFmt({locale:"ml-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1735 test.equal(result1, "yyyy, MMMM d, EEEE h:mm a");1736 test.equal(result2, "d/M/yy, E h:mm a");1737 result1 = new DateFmt({locale:"ml-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1738 test.equal(result1, "h:mm:ss a z");1739 test.done();1740 },1741 testDateTimeFormat_mr_IN: function(test) {1742 test.expect(7);1743 var result1, result2, result3, result4;1744 result1 = new DateFmt({locale:"mr-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1745 result2 = new DateFmt({locale:"mr-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1746 result3 = new DateFmt({locale:"mr-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1747 result4 = new DateFmt({locale:"mr-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1748 test.equal(result1, "EEEE, d MMMM, yyyy");1749 test.equal(result2, "EEE, d MMMM, yyyy");1750 test.equal(result3, "EE, d MMM, yyyy");1751 test.equal(result4, "E, d/M/yy");1752 result1 = new DateFmt({locale:"mr-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1753 result2 = new DateFmt({locale:"mr-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1754 test.equal(result1, "EEEE, d MMMM, yyyy रà¥à¤à¥ h:mm a");1755 test.equal(result2, "E, d/M/yy, h:mm a");1756 result1 = new DateFmt({locale:"mr-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1757 test.equal(result1, "h:mm:ss a z");1758 test.done();1759 },1760 testDateTimeFormat_ms_MY: function(test) {1761 test.expect(7);1762 var result1, result2, result3, result4;1763 result1 = new DateFmt({locale:"ms-MY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1764 result2 = new DateFmt({locale:"ms-MY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1765 result3 = new DateFmt({locale:"ms-MY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1766 result4 = new DateFmt({locale:"ms-MY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1767 test.equal(result1, "EEEE, d MMMM yyyy");1768 test.equal(result2, "EEE, d MMMM yyyy");1769 test.equal(result3, "EE, d MMM yyyy");1770 test.equal(result4, "E, d/MM/yy");1771 result1 = new DateFmt({locale:"ms-MY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1772 result2 = new DateFmt({locale:"ms-MY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1773 test.equal(result1, "EEEE, d MMMM yyyy h:mm a");1774 test.equal(result2, "E, d/MM/yy, h:mm a"); //CLDR 34 change.1775 result1 = new DateFmt({locale:"ms-MY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1776 test.equal(result1, "h:mm:ss a z");1777 test.done();1778 },1779 testDateTimeFormat_ms_BN: function(test) {1780 test.expect(15);1781 var result1, result2, result3, result4;1782 result1 = new DateFmt({locale:"ms-BN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1783 result2 = new DateFmt({locale:"ms-BN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1784 result3 = new DateFmt({locale:"ms-BN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1785 result4 = new DateFmt({locale:"ms-BN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1786 test.equal(result1, "EEEE dd MMMM yyyy");1787 test.equal(result2, "EEE d MMMM yyyy");1788 test.equal(result3, "EE d MMM yyyy");1789 test.equal(result4, "E d/MM/yy");1790 result1 = new DateFmt({locale:"ms-BN", type:"date", date:"dmw", length: "full", useNative:false, timezone:"local"}).template;1791 result2 = new DateFmt({locale:"ms-BN", type:"date", date:"dmw", length: "long", useNative:false, timezone:"local"}).template;1792 result3 = new DateFmt({locale:"ms-BN", type:"date", date:"dmw", length: "medium", useNative:false, timezone:"local"}).template;1793 result4 = new DateFmt({locale:"ms-BN", type:"date", date:"dmw", length: "short", useNative:false, timezone:"local"}).template;1794 test.equal(result1, "EEEE dd MMMM");1795 test.equal(result2, "EEE d MMMM");1796 test.equal(result3, "EE d MMM");1797 test.equal(result4, "E d/MM");1798 result1 = new DateFmt({locale:"ms-BN", type:"date", date:"dw", length: "full", useNative:false, timezone:"local"}).template;1799 result2 = new DateFmt({locale:"ms-BN", type:"date", date:"dw", length: "long", useNative:false, timezone:"local"}).template;1800 result3 = new DateFmt({locale:"ms-BN", type:"date", date:"dw", length: "medium", useNative:false, timezone:"local"}).template;1801 result4 = new DateFmt({locale:"ms-BN", type:"date", date:"dw", length: "short", useNative:false, timezone:"local"}).template;1802 test.equal(result1, "EEEE dd");1803 test.equal(result2, "EEE d");1804 test.equal(result3, "EE d");1805 test.equal(result4, "E d");1806 result1 = new DateFmt({locale:"ms-BN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1807 result2 = new DateFmt({locale:"ms-BN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1808 test.equal(result1, "EEEE dd MMMM yyyy h:mm a");1809 test.equal(result2, "E d/MM/yy, h:mm a"); //CLDR 34 change.1810 result1 = new DateFmt({locale:"ms-BN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1811 test.equal(result1, "h:mm:ss a z");1812 test.done();1813 },1814 testDateTimeFormat_nb_NO: function(test) {1815 test.expect(8);1816 var result1, result2, result3, result4;1817 result1 = new DateFmt({locale:"nb-NO", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1818 result2 = new DateFmt({locale:"nb-NO", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1819 result3 = new DateFmt({locale:"nb-NO", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1820 result4 = new DateFmt({locale:"nb-NO", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1821 test.equal(result1, "EEEE d. MMMM yyyy");1822 test.equal(result2, "EEE d. MMMM yyyy");1823 test.equal(result3, "EE d. MMM yyyy");1824 test.equal(result4, "E dd.MM.yyyy");1825 result1 = new DateFmt({locale:"nb-NO", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1826 result2 = new DateFmt({locale:"nb-NO", type:"datetime", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1827 result3 = new DateFmt({locale:"nb-NO", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1828 test.equal(result1, "EEEE d. MMMM yyyy 'kl'. HH:mm");1829 test.equal(result2, "EEE d. MMMM yyyy 'kl'. HH:mm");1830 test.equal(result3, "E dd.MM.yyyy, HH:mm");1831 result1 = new DateFmt({locale:"nb-NO", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1832 test.equal(result1, "HH:mm:ss z");1833 test.done();1834 },1835 testDateTimeFormat_nl_BE: function(test) {1836 test.expect(7);1837 var result1, result2, result3, result4;1838 result1 = new DateFmt({locale:"nl-BE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1839 result2 = new DateFmt({locale:"nl-BE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1840 result3 = new DateFmt({locale:"nl-BE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1841 result4 = new DateFmt({locale:"nl-BE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1842 test.equal(result1, "EEEE d MMMM yyyy");1843 test.equal(result2, "EEE d MMMM yyyy");1844 test.equal(result3, "EE d MMM yyyy");1845 test.equal(result4, "E d/MM/yyyy"); // CLDR 34 change1846 result1 = new DateFmt({locale:"nl-BE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1847 result2 = new DateFmt({locale:"nl-BE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1848 test.equal(result1, "EEEE d MMMM yyyy 'om' HH:mm");1849 test.equal(result2, "E d/MM/yyyy HH:mm");1850 result1 = new DateFmt({locale:"nl-BE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1851 test.equal(result1, "HH:mm:ss z");1852 test.done();1853 },1854 testDateTimeFormat_nl_NL: function(test) {1855 test.expect(7);1856 var result1, result2, result3, result4;1857 result1 = new DateFmt({locale:"nl-NL", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1858 result2 = new DateFmt({locale:"nl-NL", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1859 result3 = new DateFmt({locale:"nl-NL", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1860 result4 = new DateFmt({locale:"nl-NL", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1861 test.equal(result1, "EEEE d MMMM yyyy");1862 test.equal(result2, "EEE d MMMM yyyy");1863 test.equal(result3, "EE d MMM yyyy");1864 test.equal(result4, "E dd-MM-yyyy"); // CLDR 34 change1865 result1 = new DateFmt({locale:"nl-NL", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1866 result2 = new DateFmt({locale:"nl-NL", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1867 test.equal(result1, "EEEE d MMMM yyyy 'om' HH:mm");1868 test.equal(result2, "E dd-MM-yyyy HH:mm");1869 result1 = new DateFmt({locale:"nl-NL", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1870 test.equal(result1, "HH:mm:ss z");1871 test.done();1872 },1873 testDateTimeFormat_pa_Guru_IN: function(test) {1874 test.expect(7);1875 var result1, result2, result3, result4;1876 result1 = new DateFmt({locale:"pa-Guru-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1877 result2 = new DateFmt({locale:"pa-Guru-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1878 result3 = new DateFmt({locale:"pa-Guru-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1879 result4 = new DateFmt({locale:"pa-Guru-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1880 test.equal(result1, "EEEE, d MMMM yyyy");1881 test.equal(result2, "EEE, d MMMM yyyy");1882 test.equal(result3, "EE, d MMM yyyy");1883 test.equal(result4, "E, d/M/yy");1884 result1 = new DateFmt({locale:"pa-Guru-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1885 result2 = new DateFmt({locale:"pa-Guru-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1886 test.equal(result1, "EEEE, d MMMM yyyy h:mm a");1887 test.equal(result2, "E, d/M/yy, h:mm a");1888 result1 = new DateFmt({locale:"pa-Guru-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1889 test.equal(result1, "h:mm:ss a z");1890 test.done();1891 },1892 testDateTimeFormat_pl_PL: function(test) {1893 test.expect(7);1894 var result1, result2, result3, result4;1895 result1 = new DateFmt({locale:"pl-PL", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1896 result2 = new DateFmt({locale:"pl-PL", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1897 result3 = new DateFmt({locale:"pl-PL", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1898 result4 = new DateFmt({locale:"pl-PL", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1899 test.equal(result1, "EEEE, d MMMM yyyy");1900 test.equal(result2, "EEE, d MMMM yyyy");1901 test.equal(result3, "EE, d MMM yyyy");1902 test.equal(result4, "E, d.MM.yyyy");1903 result1 = new DateFmt({locale:"pl-PL", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1904 result2 = new DateFmt({locale:"pl-PL", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1905 test.equal(result1, "EEEE, d MMMM yyyy HH:mm");1906 test.equal(result2, "E, d.MM.yyyy, HH:mm");1907 result1 = new DateFmt({locale:"pl-PL", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1908 test.equal(result1, "HH:mm:ss z");1909 test.done();1910 },1911 testDateTimeFormat_pt_BR: function(test) {1912 test.expect(7);1913 var result1, result2, result3, result4;1914 result1 = new DateFmt({locale:"pt-BR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1915 result2 = new DateFmt({locale:"pt-BR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1916 result3 = new DateFmt({locale:"pt-BR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1917 result4 = new DateFmt({locale:"pt-BR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1918 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1919 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1920 test.equal(result3, "EE, d 'de' MMM 'de' yyyy");1921 test.equal(result4, "E, dd/MM/yyyy");1922 result1 = new DateFmt({locale:"pt-BR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1923 result2 = new DateFmt({locale:"pt-BR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1924 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy HH:mm");1925 test.equal(result2, "E, dd/MM/yyyy HH:mm");1926 result1 = new DateFmt({locale:"pt-BR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1927 test.equal(result1, "HH:mm:ss z");1928 test.done();1929 },1930 testDateTimeFormat_pt_PT: function(test) {1931 test.expect(7);1932 var result1, result2, result3, result4;1933 result1 = new DateFmt({locale:"pt-PT", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1934 result2 = new DateFmt({locale:"pt-PT", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1935 result3 = new DateFmt({locale:"pt-PT", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1936 result4 = new DateFmt({locale:"pt-PT", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1937 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");1938 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");1939 test.equal(result3, "EE, dd/MM/yyyy");1940 test.equal(result4, "E, dd/MM/yy");1941 result1 = new DateFmt({locale:"pt-PT", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1942 result2 = new DateFmt({locale:"pt-PT", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1943 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy 'à s' HH:mm");1944 test.equal(result2, "E, dd/MM/yy, HH:mm");1945 result1 = new DateFmt({locale:"pt-PT", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1946 test.equal(result1, "HH:mm:ss z");1947 test.done();1948 },1949 testDateTimeFormat_ro_RO: function(test) {1950 test.expect(7);1951 var result1, result2, result3, result4;1952 result1 = new DateFmt({locale:"ro-RO", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1953 result2 = new DateFmt({locale:"ro-RO", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1954 result3 = new DateFmt({locale:"ro-RO", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1955 result4 = new DateFmt({locale:"ro-RO", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1956 test.equal(result1, "EEEE, d MMMM yyyy");1957 test.equal(result2, "EEE, d MMMM yyyy");1958 test.equal(result3, "EE, d MMM yyyy");1959 test.equal(result4, "E, dd.MM.yyyy");1960 result1 = new DateFmt({locale:"ro-RO", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1961 result2 = new DateFmt({locale:"ro-RO", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1962 test.equal(result1, "EEEE, d MMMM yyyy, HH:mm");1963 test.equal(result2, "E, dd.MM.yyyy, HH:mm");1964 result1 = new DateFmt({locale:"ro-RO", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;;1965 test.equal(result1, "HH:mm:ss z");1966 test.done();1967 },1968 testDateTimeFormat_sr_Cyrl_RS: function(test) {1969 test.expect(7);1970 var result1, result2, result3, result4;1971 result1 = new DateFmt({locale:"sr-Cyrl-RS", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1972 result2 = new DateFmt({locale:"sr-Cyrl-RS", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1973 result3 = new DateFmt({locale:"sr-Cyrl-RS", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1974 result4 = new DateFmt({locale:"sr-Cyrl-RS", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1975 test.equal(result1, "EEEE, d. MMMM yyyy.");1976 test.equal(result2, "EEE, d. MMMM yyyy.");1977 test.equal(result3, "EE, d. M. yyyy.");1978 test.equal(result4, "E, d.M.yy.");1979 result1 = new DateFmt({locale:"sr-Cyrl-RS", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1980 result2 = new DateFmt({locale:"sr-Cyrl-RS", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1981 test.equal(result1, "EEEE, d. MMMM yyyy. HH:mm");1982 test.equal(result2, "E, d.M.yy. HH:mm");1983 result1 = new DateFmt({locale:"sr-Cyrl-RS", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;1984 test.equal(result1, "HH:mm:ss z");1985 test.done();1986 },1987 testDateTimeFormat_sr_Latn_RS: function(test) {1988 test.expect(7);1989 var result1, result2, result3, result4;1990 result1 = new DateFmt({locale:"sr-Latn-RS", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1991 result2 = new DateFmt({locale:"sr-Latn-RS", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;1992 result3 = new DateFmt({locale:"sr-Latn-RS", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;1993 result4 = new DateFmt({locale:"sr-Latn-RS", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;1994 test.equal(result1, "EEEE, d. MMMM yyyy.");1995 test.equal(result2, "EEE, d. MMMM yyyy.");1996 test.equal(result3, "EE, d. M. yyyy.");1997 test.equal(result4, "E, d.M.yy.");1998 result1 = new DateFmt({locale:"sr-Latn-RS", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;1999 result2 = new DateFmt({locale:"sr-Latn-RS", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2000 test.equal(result1, "EEEE, d. MMMM yyyy. HH:mm");2001 test.equal(result2, "E, d.M.yy. HH:mm");2002 result1 = new DateFmt({locale:"sr-Latn-RS", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;;2003 test.equal(result1, "HH:mm:ss z");2004 test.done();2005 },2006 testDateTimeFormat_ru_BY: function(test) {2007 test.expect(7);2008 var result1, result2, result3, result4;2009 result1 = new DateFmt({locale:"ru-BY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2010 result2 = new DateFmt({locale:"ru-BY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2011 result3 = new DateFmt({locale:"ru-BY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2012 result4 = new DateFmt({locale:"ru-BY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2013 test.equal(result1, "EEEE, d MMMM yyyy 'г'.");2014 test.equal(result2, "EEE, d MMMM yyyy 'г'.");2015 test.equal(result3, "EE, d MMM yyyy 'г'.");2016 test.equal(result4, "E, dd.MM.yyyy");2017 result1 = new DateFmt({locale:"ru-BY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2018 result2 = new DateFmt({locale:"ru-BY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2019 test.equal(result1, "EEEE, d MMMM yyyy 'г'., HH:mm");2020 test.equal(result2, "E, dd.MM.yyyy, HH:mm");2021 result1 = new DateFmt({locale:"ru-BY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2022 test.equal(result1, "HH:mm:ss z"); // CLDR 34 change2023 test.done();2024 },2025 testDateTimeFormat_ru_KG: function(test) {2026 test.expect(7);2027 var result1, result2, result3, result4;2028 result1 = new DateFmt({locale:"ru-KG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2029 result2 = new DateFmt({locale:"ru-KG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2030 result3 = new DateFmt({locale:"ru-KG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2031 result4 = new DateFmt({locale:"ru-KG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2032 test.equal(result1, "EEEE, d MMMM yyyy 'г'.");2033 test.equal(result2, "EEE, d MMMM yyyy 'г'.");2034 test.equal(result3, "EE, d MMM yyyy 'г'.");2035 test.equal(result4, "E, dd.MM.yyyy");2036 result1 = new DateFmt({locale:"ru-KG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2037 result2 = new DateFmt({locale:"ru-KG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2038 test.equal(result1, "EEEE, d MMMM yyyy 'г'., HH:mm");2039 test.equal(result2, "E, dd.MM.yyyy, HH:mm");2040 result1 = new DateFmt({locale:"ru-KG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2041 test.equal(result1, "HH:mm:ss z"); // CLDR 34 change2042 test.done();2043 },2044 testDateTimeFormat_ru_KZ: function(test) {2045 test.expect(7);2046 var result1, result2, result3, result4;2047 result1 = new DateFmt({locale:"ru-KZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2048 result2 = new DateFmt({locale:"ru-KZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2049 result3 = new DateFmt({locale:"ru-KZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2050 result4 = new DateFmt({locale:"ru-KZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2051 test.equal(result1, "EEEE, d MMMM yyyy 'г'.");2052 test.equal(result2, "EEE, d MMMM yyyy 'г'.");2053 test.equal(result3, "EE, d MMM yyyy 'г'.");2054 test.equal(result4, "E, dd.MM.yyyy");2055 result1 = new DateFmt({locale:"ru-KZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2056 result2 = new DateFmt({locale:"ru-KZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2057 test.equal(result1, "EEEE, d MMMM yyyy 'г'., HH:mm");2058 test.equal(result2, "E, dd.MM.yyyy, HH:mm");2059 result1 = new DateFmt({locale:"ru-KZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2060 test.equal(result1, "HH:mm:ss z"); // CLDR 34 change2061 test.done();2062 },2063 testDateTimeFormat_ru_GE: function(test) {2064 test.expect(7);2065 var result1, result2, result3, result4;2066 result1 = new DateFmt({locale:"ru-GE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2067 result2 = new DateFmt({locale:"ru-GE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2068 result3 = new DateFmt({locale:"ru-GE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2069 result4 = new DateFmt({locale:"ru-GE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2070 test.equal(result1, "EEEE, d MMMM yyyy 'г'.");2071 test.equal(result2, "EEE, d MMMM yyyy 'г'.");2072 test.equal(result3, "EE, d MMM yyyy 'г'.");2073 test.equal(result4, "E, dd.MM.yyyy");2074 result1 = new DateFmt({locale:"ru-GE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2075 result2 = new DateFmt({locale:"ru-GE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2076 test.equal(result1, "EEEE, d MMMM yyyy 'г'., HH:mm");2077 test.equal(result2, "E, dd.MM.yyyy, HH:mm");2078 result1 = new DateFmt({locale:"ru-GE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2079 test.equal(result1, "HH:mm:ss z"); // CLDR 34 change2080 test.done();2081 },2082 testDateTimeFormat_ru_RU: function(test) {2083 test.expect(7);2084 var result1, result2, result3, result4;2085 result1 = new DateFmt({locale:"ru-RU", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2086 result2 = new DateFmt({locale:"ru-RU", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2087 result3 = new DateFmt({locale:"ru-RU", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2088 result4 = new DateFmt({locale:"ru-RU", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2089 test.equal(result1, "EEEE, d MMMM yyyy 'г'.");2090 test.equal(result2, "EEE, d MMMM yyyy 'г'.");2091 test.equal(result3, "EE, d MMM yyyy 'г'.");2092 test.equal(result4, "E, dd.MM.yyyy");2093 result1 = new DateFmt({locale:"ru-RU", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2094 result2 = new DateFmt({locale:"ru-RU", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2095 test.equal(result1, "EEEE, d MMMM yyyy 'г'., HH:mm");2096 test.equal(result2, "E, dd.MM.yyyy, HH:mm");2097 result1 = new DateFmt({locale:"ru-RU", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2098 test.equal(result1, "HH:mm:ss z"); // CLDR 34 change2099 test.done();2100 },2101 testDateTimeFormat_ru_UA: function(test) {2102 test.expect(7);2103 var result1, result2, result3, result4;2104 result1 = new DateFmt({locale:"ru-UA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2105 result2 = new DateFmt({locale:"ru-UA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2106 result3 = new DateFmt({locale:"ru-UA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2107 result4 = new DateFmt({locale:"ru-UA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2108 test.equal(result1, "EEEE, d MMMM yyyy 'г'.");2109 test.equal(result2, "EEE, d MMMM yyyy 'г'.");2110 test.equal(result3, "EE, d MMM yyyy 'г'.");2111 test.equal(result4, "E, dd.MM.yyyy");2112 result1 = new DateFmt({locale:"ru-UA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2113 result2 = new DateFmt({locale:"ru-UA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2114 test.equal(result1, "EEEE, d MMMM yyyy 'г'., HH:mm");2115 test.equal(result2, "E, dd.MM.yyyy, HH:mm");2116 result1 = new DateFmt({locale:"ru-UA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2117 test.equal(result1, "HH:mm:ss z"); // CLDR 34 change2118 test.done();2119 },2120 testDateTimeFormat_sk_SK: function(test) {2121 test.expect(7);2122 var result1, result2, result3, result4;2123 result1 = new DateFmt({locale:"sk-SK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2124 result2 = new DateFmt({locale:"sk-SK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2125 result3 = new DateFmt({locale:"sk-SK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2126 result4 = new DateFmt({locale:"sk-SK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2127 test.equal(result1, "EEEE d. MMMM yyyy"); // CLDR 34 change2128 test.equal(result2, "EEE d. MMMM yyyy");2129 test.equal(result3, "EE d. M. yyyy");2130 test.equal(result4, "E d. M. yyyy");2131 result1 = new DateFmt({locale:"sk-SK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2132 result2 = new DateFmt({locale:"sk-SK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2133 test.equal(result1, "EEEE d. MMMM yyyy, H:mm");2134 test.equal(result2, "E d. M. yyyy H:mm");2135 result1 = new DateFmt({locale:"sk-SK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2136 test.equal(result1, "H:mm:ss z");2137 test.done();2138 },2139 testDateTimeFormat_sl_SI: function(test) {2140 test.expect(7);2141 var result1, result2, result3, result4;2142 result1 = new DateFmt({locale:"sl-SI", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2143 result2 = new DateFmt({locale:"sl-SI", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2144 result3 = new DateFmt({locale:"sl-SI", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2145 result4 = new DateFmt({locale:"sl-SI", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2146 test.equal(result1, "EEEE, d. MMMM yyyy");2147 test.equal(result2, "EEE, d. MMMM yyyy");2148 test.equal(result3, "EE, d. MMM yyyy");2149 test.equal(result4, "E, d. MM. yy");2150 result1 = new DateFmt({locale:"sl-SI", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2151 result2 = new DateFmt({locale:"sl-SI", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2152 test.equal(result1, "EEEE, d. MMMM yyyy HH:mm");2153 test.equal(result2, "E, d. MM. yy, HH:mm");2154 result1 = new DateFmt({locale:"sl-SI", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2155 test.equal(result1, "HH:mm:ss z");2156 test.done();2157 },2158 testDateTimeFormat_sq_AL: function(test) {2159 test.expect(7);2160 var result1, result2, result3, result4;2161 result1 = new DateFmt({locale:"sq-AL", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2162 result2 = new DateFmt({locale:"sq-AL", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2163 result3 = new DateFmt({locale:"sq-AL", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2164 result4 = new DateFmt({locale:"sq-AL", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2165 test.equal(result1, "EEEE, d MMMM yyyy");2166 test.equal(result2, "EEE, d MMMM yyyy");2167 test.equal(result3, "EE, d MMM yyyy");2168 test.equal(result4, "E, d.M.yy");2169 result1 = new DateFmt({locale:"sq-AL", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2170 result2 = new DateFmt({locale:"sq-AL", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2171 test.equal(result1, "EEEE, d MMMM yyyy 'në' h:mm a");2172 test.equal(result2, "E, d.M.yy, h:mm a");2173 result1 = new DateFmt({locale:"sq-AL", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2174 test.equal(result1, "h:mm:ss a z");2175 test.done();2176 },2177 testDateTimeFormat_sq_ME: function(test) {2178 test.expect(7);2179 var result1, result2, result3, result4;2180 result1 = new DateFmt({locale:"sq-ME", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2181 result2 = new DateFmt({locale:"sq-ME", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2182 result3 = new DateFmt({locale:"sq-ME", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2183 result4 = new DateFmt({locale:"sq-ME", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2184 test.equal(result1, "EEEE, d MMMM yyyy");2185 test.equal(result2, "EEE, d MMMM yyyy");2186 test.equal(result3, "EE, d MMM yyyy");2187 test.equal(result4, "E, d.M.yy");2188 result1 = new DateFmt({locale:"sq-ME", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2189 result2 = new DateFmt({locale:"sq-ME", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2190 test.equal(result1, "EEEE, d MMMM yyyy 'në' HH:mm");2191 test.equal(result2, "E, d.M.yy, HH:mm");2192 result1 = new DateFmt({locale:"sq-ME", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2193 test.equal(result1, "HH:mm:ss z");2194 test.done();2195 },2196 testDateTimeFormat_sv_FI: function(test) {2197 test.expect(7);2198 var result1, result2, result3, result4;2199 result1 = new DateFmt({locale:"sv-FI", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2200 result2 = new DateFmt({locale:"sv-FI", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2201 result3 = new DateFmt({locale:"sv-FI", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2202 result4 = new DateFmt({locale:"sv-FI", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2203 test.equal(result1, 'EEEE d MMMM yyyy');2204 test.equal(result2, 'EEE d MMMM yyyy');2205 test.equal(result3, 'EE d MMM yyyy');2206 test.equal(result4, 'E yyyy-MM-dd');2207 result1 = new DateFmt({locale:"sv-FI", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2208 result2 = new DateFmt({locale:"sv-FI", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2209 test.equal(result1, 'EEEE d MMMM yyyy HH:mm');2210 test.equal(result2, 'E yyyy-MM-dd HH:mm');2211 result1 = new DateFmt({locale:"sv-FI", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2212 test.equal(result1, "HH:mm:ss z");2213 test.done();2214 },2215 testDateTimeFormat_sv_SE: function(test) {2216 test.expect(7);2217 var result1, result2, result3, result4;2218 result1 = new DateFmt({locale:"sv-SE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2219 result2 = new DateFmt({locale:"sv-SE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2220 result3 = new DateFmt({locale:"sv-SE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2221 result4 = new DateFmt({locale:"sv-SE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2222 test.equal(result1, "EEEE d MMMM yyyy");2223 test.equal(result2, "EEE d MMMM yyyy");2224 test.equal(result3, "EE d MMM yyyy");2225 test.equal(result4, "E yyyy-MM-dd");2226 result1 = new DateFmt({locale:"sv-SE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2227 result2 = new DateFmt({locale:"sv-SE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2228 test.equal(result1, "EEEE d MMMM yyyy HH:mm");2229 test.equal(result2, "E yyyy-MM-dd HH:mm");2230 result1 = new DateFmt({locale:"sv-SE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2231 test.equal(result1, "HH:mm:ss z");2232 test.done();2233 },2234 testDateTimeFormat_ta_IN: function(test) {2235 test.expect(7);2236 var result1, result2, result3, result4;2237 result1 = new DateFmt({locale:"ta-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2238 result2 = new DateFmt({locale:"ta-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2239 result3 = new DateFmt({locale:"ta-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2240 result4 = new DateFmt({locale:"ta-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2241 test.equal(result1, "EEEE, d MMMM, yyyy");2242 test.equal(result2, "EEE, d MMMM, yyyy");2243 test.equal(result3, "EE, d MMM, yyyy");2244 test.equal(result4, "E, d/M/yy");2245 result1 = new DateFmt({locale:"ta-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2246 result2 = new DateFmt({locale:"ta-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2247 test.equal(result1, "EEEE, d MMMM, yyyy à®
னà¯à®±à¯ a h:mm");2248 test.equal(result2, "E, d/M/yy, a h:mm");2249 result1 = new DateFmt({locale:"ta-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2250 test.equal(result1, "a h:mm:ss z");2251 test.done();2252 },2253 testDateTimeFormat_te_IN: function(test) {2254 test.expect(7);2255 var result1, result2, result3, result4;2256 result1 = new DateFmt({locale:"te-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2257 result2 = new DateFmt({locale:"te-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2258 result3 = new DateFmt({locale:"te-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2259 result4 = new DateFmt({locale:"te-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2260 test.equal(result1, "d, MMMM yyyy, EEEE");2261 test.equal(result2, "d MMMM, yyyy, EEE");2262 test.equal(result3, "d MMM, yyyy, EE");2263 test.equal(result4, "dd-MM-yy, E");2264 result1 = new DateFmt({locale:"te-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2265 result2 = new DateFmt({locale:"te-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2266 test.equal(result1, "d, MMMM yyyy, EEEE h:mm aà°à°¿"); // CLDR 34 change2267 test.equal(result2, "dd-MM-yy, E h:mm a");2268 result1 = new DateFmt({locale:"te-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2269 test.equal(result1, "h:mm:ss a z");2270 test.done();2271 },2272 testDateTimeFormat_th_TH: function(test) {2273 test.expect(7);2274 var result1, result2, result3, result4;2275 result1 = new DateFmt({locale:"th-TH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2276 result2 = new DateFmt({locale:"th-TH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2277 result3 = new DateFmt({locale:"th-TH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2278 result4 = new DateFmt({locale:"th-TH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2279 test.equal(result1, "EEEEà¸à¸µà¹ d MMMM yyyy");2280 test.equal(result2, "EEEà¸à¸µà¹ d MMMM yyyy");2281 test.equal(result3, "EEà¸à¸µà¹ d MMM yyyy");2282 test.equal(result4, "Eà¸à¸µà¹ d/M/yy");2283 result1 = new DateFmt({locale:"th-TH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2284 result2 = new DateFmt({locale:"th-TH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2285 test.equal(result1, "EEEEà¸à¸µà¹ d MMMM yyyy HH:mm");2286 test.equal(result2, "Eà¸à¸µà¹ d/M/yy HH:mm");2287 result1 = new DateFmt({locale:"th-TH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2288 test.equal(result1, "HH:mm:ss z");2289 test.done();2290 },2291 testDateTimeFormat_tr_AM: function(test) {2292 test.expect(7);2293 var result1, result2, result3, result4;2294 result1 = new DateFmt({locale:"tr-AM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2295 result2 = new DateFmt({locale:"tr-AM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2296 result3 = new DateFmt({locale:"tr-AM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2297 result4 = new DateFmt({locale:"tr-AM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2298 test.equal(result1, "d MMMM yyyy EEEE");2299 test.equal(result2, "d MMMM yyyy EEE");2300 test.equal(result3, "d MMM yyyy EE");2301 test.equal(result4, "d.MM.yyyy E");2302 result1 = new DateFmt({locale:"tr-AM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2303 result2 = new DateFmt({locale:"tr-AM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2304 test.equal(result1, "d MMMM yyyy EEEE HH:mm");2305 test.equal(result2, "d.MM.yyyy E HH:mm");2306 result1 = new DateFmt({locale:"tr-AM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2307 test.equal(result1, "HH:mm:ss z");2308 test.done();2309 },2310 testDateTimeFormat_tr_AZ: function(test) {2311 test.expect(7);2312 var result1, result2, result3, result4;2313 result1 = new DateFmt({locale:"tr-AZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2314 result2 = new DateFmt({locale:"tr-AZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2315 result3 = new DateFmt({locale:"tr-AZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2316 result4 = new DateFmt({locale:"tr-AZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2317 test.equal(result1, "d MMMM yyyy EEEE");2318 test.equal(result2, "d MMMM yyyy EEE");2319 test.equal(result3, "d MMM yyyy EE");2320 test.equal(result4, "d.MM.yyyy E");2321 result1 = new DateFmt({locale:"tr-AZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2322 result2 = new DateFmt({locale:"tr-AZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2323 test.equal(result1, "d MMMM yyyy EEEE HH:mm");2324 test.equal(result2, "d.MM.yyyy E HH:mm");2325 result1 = new DateFmt({locale:"tr-AZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2326 test.equal(result1, "HH:mm:ss z");2327 test.done();2328 },2329 testDateTimeFormat_tr_CY: function(test) {2330 test.expect(7);2331 var result1, result2, result3, result4;2332 result1 = new DateFmt({locale:"tr-CY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2333 result2 = new DateFmt({locale:"tr-CY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2334 result3 = new DateFmt({locale:"tr-CY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2335 result4 = new DateFmt({locale:"tr-CY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2336 test.equal(result1, "d MMMM yyyy EEEE");2337 test.equal(result2, "d MMMM yyyy EEE");2338 test.equal(result3, "d MMM yyyy EE");2339 test.equal(result4, "d.MM.yyyy E");2340 result1 = new DateFmt({locale:"tr-CY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2341 result2 = new DateFmt({locale:"tr-CY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2342 test.equal(result1, "d MMMM yyyy EEEE h:mm a");2343 test.equal(result2, "d.MM.yyyy E h:mm a");2344 result1 = new DateFmt({locale:"tr-CY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2345 test.equal(result1, "h:mm:ss a z");2346 test.done();2347 },2348 testDateTimeFormat_tr_TR: function(test) {2349 test.expect(7);2350 var result1, result2, result3, result4;2351 result1 = new DateFmt({locale:"tr-TR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2352 result2 = new DateFmt({locale:"tr-TR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2353 result3 = new DateFmt({locale:"tr-TR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2354 result4 = new DateFmt({locale:"tr-TR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2355 test.equal(result1, "d MMMM yyyy EEEE");2356 test.equal(result2, "d MMMM yyyy EEE");2357 test.equal(result3, "d MMM yyyy EE");2358 test.equal(result4, "d.MM.yyyy E");2359 result1 = new DateFmt({locale:"tr-TR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2360 result2 = new DateFmt({locale:"tr-TR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2361 test.equal(result1, "d MMMM yyyy EEEE HH:mm");2362 test.equal(result2, "d.MM.yyyy E HH:mm");2363 result1 = new DateFmt({locale:"tr-TR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2364 test.equal(result1, "HH:mm:ss z");2365 test.done();2366 },2367 testDateTimeFormat_uk_UA: function(test) {2368 test.expect(7);2369 var result1, result2, result3, result4;2370 result1 = new DateFmt({locale:"uk-UA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2371 result2 = new DateFmt({locale:"uk-UA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2372 result3 = new DateFmt({locale:"uk-UA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2373 result4 = new DateFmt({locale:"uk-UA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2374 test.equal(result1, "EEEE, d MMMM yyyy 'Ñ'.");2375 test.equal(result2, "EEE, d MMMM yyyy 'Ñ'.");2376 test.equal(result3, "EE, d MMM yyyy 'Ñ'.");2377 test.equal(result4, "E, dd.MM.yy");2378 result1 = new DateFmt({locale:"uk-UA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2379 result2 = new DateFmt({locale:"uk-UA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2380 test.equal(result1, "EEEE, d MMMM yyyy 'Ñ'. 'о' HH:mm");2381 test.equal(result2, "E, dd.MM.yy, HH:mm");2382 result1 = new DateFmt({locale:"uk-UA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2383 test.equal(result1, "HH:mm:ss z");2384 test.done();2385 },2386 testDateTimeFormat_ur_IN: function(test) {2387 test.expect(7);2388 var result1, result2, result3, result4;2389 result1 = new DateFmt({locale:"ur-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2390 result2 = new DateFmt({locale:"ur-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2391 result3 = new DateFmt({locale:"ur-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2392 result4 = new DateFmt({locale:"ur-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2393 test.equal(result1, "EEEEØ d MMMMØ yyyy");2394 test.equal(result2, "EEEØ d MMMMØ yyyy");2395 test.equal(result3, 'EEØ d MMMØ yyyy'); // CLDR 34 change2396 test.equal(result4, 'EØ d/M/yy');2397 result1 = new DateFmt({locale:"ur-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2398 result2 = new DateFmt({locale:"ur-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2399 test.equal(result1, 'EEEEØ d MMMMØ yyyy âh:mm a');2400 test.equal(result2, 'EØ d/M/yy âh:mm a');2401 result1 = new DateFmt({locale:"ur-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2402 test.equal(result1, 'âh:mm:ss a z');2403 test.done();2404 },2405 testDateTimeFormat_uz_Latn_UZ: function(test) {2406 test.expect(7);2407 var result1, result2, result3, result4;2408 result1 = new DateFmt({locale:"uz-Latn-UZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2409 result2 = new DateFmt({locale:"uz-Latn-UZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2410 result3 = new DateFmt({locale:"uz-Latn-UZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2411 result4 = new DateFmt({locale:"uz-Latn-UZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2412 test.equal(result1, "EEEE, d-MMMM, yyyy");2413 test.equal(result2, "EEE, d-MMMM, yyyy");2414 test.equal(result3, "EE, d-MMM, yyyy");2415 test.equal(result4, "E, dd/MM/yy");2416 result1 = new DateFmt({locale:"uz-Latn-UZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2417 result2 = new DateFmt({locale:"uz-Latn-UZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2418 test.equal(result1, "EEEE, d-MMMM, yyyy, HH:mm");2419 test.equal(result2, "E, dd/MM/yy, HH:mm");2420 result1 = new DateFmt({locale:"uz-Latn-UZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2421 test.equal(result1, "HH:mm:ss (z)");2422 test.done();2423 },2424 testDateTimeFormat_vi_VN: function(test) {2425 test.expect(7);2426 var result1, result2, result3, result4;2427 result1 = new DateFmt({locale:"vi-VN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2428 result2 = new DateFmt({locale:"vi-VN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2429 result3 = new DateFmt({locale:"vi-VN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2430 result4 = new DateFmt({locale:"vi-VN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2431 test.equal(result1, "EEEE, d MMMM, yyyy");2432 test.equal(result2, "EEE, d MMMM, yyyy");2433 test.equal(result3, "EE, d MMM, yyyy");2434 test.equal(result4, "E, dd/MM/yyyy");2435 result1 = new DateFmt({locale:"vi-VN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2436 result2 = new DateFmt({locale:"vi-VN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2437 test.equal(result1, "HH:mm EEEE, d MMMM, yyyy");2438 test.equal(result2, "HH:mm, E, dd/MM/yyyy");2439 result1 = new DateFmt({locale:"vi-VN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2440 test.equal(result1, "HH:mm:ss z");2441 test.done();2442 },2443 testDateTimeFormat_zh_Hans_CN: function(test) {2444 test.expect(7);2445 var result1, result2, result3, result4;2446 result1 = new DateFmt({locale:"zh-Hans-CN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2447 result2 = new DateFmt({locale:"zh-Hans-CN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2448 result3 = new DateFmt({locale:"zh-Hans-CN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2449 result4 = new DateFmt({locale:"zh-Hans-CN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2450 test.equal(result1, "yyyyå¹´Mædæ¥EEEE");2451 test.equal(result2, "yyyyå¹´Mædæ¥EEE");2452 test.equal(result3, "yyyyå¹´Mædæ¥EE");2453 test.equal(result4, "yyyy/M/dE");2454 result1 = new DateFmt({locale:"zh-Hans-CN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2455 result2 = new DateFmt({locale:"zh-Hans-CN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2456 test.equal(result1, "yyyyå¹´Mædæ¥EEEE HH:mm");2457 test.equal(result2, "yyyy/M/dE HH:mm");2458 result1 = new DateFmt({locale:"zh-Hans-CN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;;2459 test.equal(result1, "z HH:mm:ss");2460 test.done();2461 },2462 testDateTimeFormat_zh_Hant_HK: function(test) {2463 test.expect(7);2464 var result1, result2, result3, result4;2465 result1 = new DateFmt({locale:"zh-Hant-HK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2466 result2 = new DateFmt({locale:"zh-Hant-HK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2467 result3 = new DateFmt({locale:"zh-Hant-HK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2468 result4 = new DateFmt({locale:"zh-Hant-HK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2469 test.equal(result1, "yyyyå¹´Mædæ¥EEEE");2470 test.equal(result2, "yyyyå¹´Mædæ¥EEE");2471 test.equal(result3, "yyyyå¹´Mædæ¥EE");2472 test.equal(result4, "d/M/yyyyE");2473 result1 = new DateFmt({locale:"zh-Hant-HK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2474 result2 = new DateFmt({locale:"zh-Hant-HK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2475 test.equal(result1, "yyyyå¹´Mædæ¥EEEE ah:mm");2476 test.equal(result2, "d/M/yyyyE ah:mm");2477 result1 = new DateFmt({locale:"zh-Hant-HK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2478 test.equal(result1, "ah:mm:ss [z]");2479 test.done();2480 },2481 testDateTimeFormat_zh_Hant_TW: function(test) {2482 test.expect(7);2483 var result1, result2, result3, result4;2484 result1 = new DateFmt({locale:"zh-Hant-TW", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2485 result2 = new DateFmt({locale:"zh-Hant-TW", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2486 result3 = new DateFmt({locale:"zh-Hant-TW", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2487 result4 = new DateFmt({locale:"zh-Hant-TW", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2488 test.equal(result1, "yyyyå¹´Mædæ¥ EEEE");2489 test.equal(result2, "yyyyå¹´Mædæ¥ EEE");2490 test.equal(result3, "yyyyå¹´Mædæ¥ EE");2491 test.equal(result4, "yyyy/M/d E");2492 result1 = new DateFmt({locale:"zh-Hant-TW", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2493 result2 = new DateFmt({locale:"zh-Hant-TW", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2494 test.equal(result1, "yyyyå¹´Mædæ¥ EEEE Bh:mm");2495 test.equal(result2, "yyyy/M/d E Bh:mm");2496 result1 = new DateFmt({locale:"zh-Hant-TW", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2497 test.equal(result1, "Bh:mm:ss [z]");2498 test.done();2499 },2500 testDateTimeFormat_en_GE: function(test) {2501 test.expect(7);2502 var result1, result2, result3, result4;2503 result1 = new DateFmt({locale:"en-GE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2504 result3 = new DateFmt({locale:"en-GE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2505 result4 = new DateFmt({locale:"en-GE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2506 result2 = new DateFmt({locale:"en-GE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2507 test.equal(result1, "EEEE, MMMM d, yyyy");2508 test.equal(result2, "EEE, MMMM d, yyyy");2509 test.equal(result3, "EE, MMM d, yyyy");2510 test.equal(result4, "E, M/d/yy");2511 result1 = new DateFmt({locale:"en-GE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2512 result2 = new DateFmt({locale:"en-GE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2513 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");2514 test.equal(result2, "E, M/d/yy, HH:mm");2515 result1 = new DateFmt({locale:"en-GE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2516 test.equal(result1, "HH:mm:ss z");2517 test.done();2518 },2519 testDateTimeFormat_en_CN: function(test) {2520 test.expect(7);2521 var result1, result2, result3, result4;2522 result1 = new DateFmt({locale:"en-CN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2523 result2 = new DateFmt({locale:"en-CN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2524 result3 = new DateFmt({locale:"en-CN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2525 result4 = new DateFmt({locale:"en-CN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2526 test.equal(result1, "EEEE, MMMM d, yyyy");2527 test.equal(result2, "EEE, MMMM d, yyyy");2528 test.equal(result3, "EE, MMM d, yyyy");2529 test.equal(result4, "E, M/d/yy");2530 result1 = new DateFmt({locale:"en-CN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2531 result2 = new DateFmt({locale:"en-CN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2532 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");2533 test.equal(result2, "E, M/d/yy, HH:mm");2534 result1 = new DateFmt({locale:"en-CN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2535 test.equal(result1, "HH:mm:ss z");2536 test.done();2537 },2538 testDateTimeFormat_en_MX: function(test) {2539 test.expect(7);2540 var result1, result2, result3, result4;2541 result1 = new DateFmt({locale:"en-MX", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2542 result2 = new DateFmt({locale:"en-MX", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2543 result3 = new DateFmt({locale:"en-MX", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2544 result4 = new DateFmt({locale:"en-MX", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2545 test.equal(result1, "EEEE, MMMM d, yyyy");2546 test.equal(result2, "EEE, MMMM d, yyyy");2547 test.equal(result3, "EE, MMM d, yyyy");2548 test.equal(result4, "E, M/d/yy");2549 result1 = new DateFmt({locale:"en-MX", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2550 result2 = new DateFmt({locale:"en-MX", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2551 test.equal(result1, "EEEE, MMMM d, yyyy 'at' HH:mm");2552 test.equal(result2, "E, M/d/yy, HH:mm");2553 result1 = new DateFmt({locale:"en-MX", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2554 test.equal(result1, "HH:mm:ss z");2555 test.done();2556 },2557 testDateTimeFormat_en_TW: function(test) {2558 test.expect(7);2559 var result1, result2, result3, result4;2560 result1 = new DateFmt({locale:"en-TW", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2561 result2 = new DateFmt({locale:"en-TW", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2562 result3 = new DateFmt({locale:"en-TW", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2563 result4 = new DateFmt({locale:"en-TW", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2564 test.equal(result1, "EEEE, MMMM d, yyyy");2565 test.equal(result2, "EEE, MMMM d, yyyy");2566 test.equal(result3, "EE, MMM d, yyyy");2567 test.equal(result4, "E, M/d/yy");2568 result1 = new DateFmt({locale:"en-TW", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2569 result2 = new DateFmt({locale:"en-TW", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2570 test.equal(result1, "EEEE, MMMM d, yyyy 'at' h:mm a");2571 test.equal(result2, "E, M/d/yy, h:mm a");2572 result1 = new DateFmt({locale:"en-TW", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2573 test.equal(result1, "h:mm:ss a z");2574 test.done();2575 },2576 testDateTimeFormat_mn_MN: function(test) {2577 test.expect(7);2578 var result1, result2, result3, result4;2579 result1 = new DateFmt({locale:"mn-Cyrl-MN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2580 result2 = new DateFmt({locale:"mn-Cyrl-MN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2581 result3 = new DateFmt({locale:"mn-Cyrl-MN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2582 result4 = new DateFmt({locale:"mn-Cyrl-MN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2583 test.equal(result1, 'yyyy \'онÑ\' MMMM\'Ñн\' d, EEEE \'гаÑаг\'');2584 test.equal(result2, 'yyyy \'онÑ\' MMMM\'Ñн\' d, EEE \'гаÑаг\'');2585 test.equal(result3, 'yyyy \'онÑ\' MMM\'Ñн\' d, EE \'гаÑаг\'');2586 test.equal(result4, 'yyyy.MM.dd, E \'гаÑаг\'');2587 result1 = new DateFmt({locale:"mn-Cyrl-MN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2588 result2 = new DateFmt({locale:"mn-Cyrl-MN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2589 test.equal(result1, 'yyyy \'онÑ\' MMMM\'Ñн\' d, EEEE \'гаÑаг\' HH:mm');2590 test.equal(result2, 'yyyy.MM.dd, E \'гаÑаг\' HH:mm');2591 result1 = new DateFmt({locale:"mn-Cyrl-MN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2592 test.equal(result1, "HH:mm:ss (z)"); //// CLDR 34 change2593 test.done();2594 },2595 testDateTimeFormat_es_CA: function(test) {2596 test.expect(7);2597 var result1, result2, result3, result4;2598 result1 = new DateFmt({locale:"es-CA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2599 result2 = new DateFmt({locale:"es-CA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2600 result3 = new DateFmt({locale:"es-CA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2601 result4 = new DateFmt({locale:"es-CA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2602 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");2603 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");2604 test.equal(result3, "EE, d MMM yyyy");2605 test.equal(result4, "E, d/M/yy");2606 result1 = new DateFmt({locale:"es-CA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2607 result2 = new DateFmt({locale:"es-CA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2608 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy, h:mm a");2609 test.equal(result2, "E, d/M/yy, h:mm a");2610 result1 = new DateFmt({locale:"es-CA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2611 test.equal(result1, "h:mm:ss a z");2612 test.done();2613 },2614 testDateTimeFormat_af_ZA: function(test) {2615 test.expect(7);2616 var result1, result2, result3, result4;2617 result1 = new DateFmt({locale:"af-ZA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2618 result2 = new DateFmt({locale:"af-ZA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2619 result3 = new DateFmt({locale:"af-ZA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2620 result4 = new DateFmt({locale:"af-ZA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2621 test.equal(result1, "EEEE dd MMMM yyyy"); //// CLDR 34 change2622 test.equal(result2, "EEE dd MMMM yyyy");2623 test.equal(result3, "EE dd MMM yyyy");2624 test.equal(result4, "E yyyy-MM-dd");2625 result1 = new DateFmt({locale:"af-ZA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2626 result2 = new DateFmt({locale:"af-ZA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2627 test.equal(result1, "EEEE dd MMMM yyyy HH:mm");2628 test.equal(result2, "E yyyy-MM-dd HH:mm");2629 result1 = new DateFmt({locale:"af-ZA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2630 test.equal(result1,"HH:mm:ss z");2631 test.done();2632 },2633 testDateTimeFormat_am_ET: function(test) {2634 test.expect(7);2635 var result1, result2, result3, result4;2636 result1 = new DateFmt({locale:"am-ET", type:"date", date:"dmwy", length: "full", calendar:"ethiopic", useNative:false, timezone:"local"})2637 result2 = new DateFmt({locale:"am-ET", type:"date", date:"dmwy", length: "long", calendar:"ethiopic", useNative:false, timezone:"local"}).template;2638 result3 = new DateFmt({locale:"am-ET", type:"date", date:"dmwy", length: "medium", calendar:"ethiopic", useNative:false, timezone:"local"}).template;2639 result4 = new DateFmt({locale:"am-ET", type:"date", date:"dmwy", length: "short", calendar:"ethiopic", useNative:false, timezone:"local"}).template;2640 test.equal(result1, "EEEEᣠd MMMM yyyy");2641 test.equal(result2, "EEEᣠd MMMM yyyy");2642 test.equal(result3, "EEᣠd MMM yyyy");2643 test.equal(result4, "Eᣠdd/MM/yyyy");2644 result1 = new DateFmt({locale:"am-ET", type:"datetime", date:"dmwy", length: "full", calendar:"ethiopic", useNative:false, timezone:"local"})2645 result2 = new DateFmt({locale:"am-ET", type:"datetime", date:"dmwy", length: "short", calendar:"ethiopic", useNative:false, timezone:"local"})2646 test.equal(result1, "EEEEᣠd MMMM yyyy h:mm a");2647 test.equal(result2, "Eᣠdd/MM/yyyy h:mm a");2648 result1 = new DateFmt({locale:"am-ET", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2649 test.equal(result1, "h:mm:ss a z");2650 test.done();2651 },2652 testDateTimeFormat_ha_Latn_NG: function(test) {2653 test.expect(7);2654 var result1, result2, result3, result4;2655 result1 = new DateFmt({locale:"ha-Latn-NG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2656 result2 = new DateFmt({locale:"ha-Latn-NG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2657 result3 = new DateFmt({locale:"ha-Latn-NG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2658 result4 = new DateFmt({locale:"ha-Latn-NG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2659 test.equal(result1, 'EEEE d MMMM, yyyy');2660 test.equal(result2, 'EEE d MMMM, yyyy');2661 test.equal(result3, 'EE d MMM, yyyy');2662 test.equal(result4, 'E d/M/yy');2663 result1 = new DateFmt({locale:"ha-Latn-NG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2664 result2 = new DateFmt({locale:"ha-Latn-NG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2665 test.equal(result1, 'EEEE d MMMM, yyyy HH:mm');2666 test.equal(result2, 'E d/M/yy, HH:mm');2667 result1 = new DateFmt({locale:"ha-Latn-NG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2668 test.equal(result1, "HH:mm:ss z");2669 test.done();2670 },2671 testDateTimeFormat_or_IN: function(test) {2672 test.expect(7);2673 var result1, result2, result3, result4;2674 result1 = new DateFmt({locale:"or-IN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2675 result2 = new DateFmt({locale:"or-IN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2676 result3 = new DateFmt({locale:"or-IN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2677 result4 = new DateFmt({locale:"or-IN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2678 //// CLDR 34 change ////2679 test.equal(result1, "EEEE, MMMM d, yyyy");2680 test.equal(result2, "EEE, MMMM d, yyyy");2681 test.equal(result3, "EE, MMM d, yyyy");2682 test.equal(result4, "E, M/d/yy");2683 result1 = new DateFmt({locale:"or-IN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2684 result2 = new DateFmt({locale:"or-IN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2685 test.equal(result1, "h:mm a ଠାରà EEEE, MMMM d, yyyy"); //// CLDR 34 change2686 test.equal(result2, "E, M/d/yy, h:mm a");2687 result1 = new DateFmt({locale:"or-IN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2688 test.equal(result1, "h:mm:ss a z");2689 test.done();2690 },2691 testDateTimeFormat_az_Latn_AZ: function(test) {2692 test.expect(7);2693 var result1, result2, result3, result4;2694 result1 = new DateFmt({locale:"az-Latn-AZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2695 result2 = new DateFmt({locale:"az-Latn-AZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2696 result3 = new DateFmt({locale:"az-Latn-AZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2697 result4 = new DateFmt({locale:"az-Latn-AZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2698 test.equal(result1, "d MMMM yyyy, EEEE");2699 test.equal(result2, "d MMMM yyyy, EEE");2700 test.equal(result3, "d MMM yyyy, EE");2701 test.equal(result4, "dd.MM.yy, E");2702 result1 = new DateFmt({locale:"az-Latn-AZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2703 result2 = new DateFmt({locale:"az-Latn-AZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2704 test.equal(result1, "d MMMM yyyy, EEEE HH:mm");2705 test.equal(result2, "dd.MM.yy, E HH:mm");2706 result1 = new DateFmt({locale:"az-Latn-AZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2707 test.equal(result1, "HH:mm:ss z");2708 test.done();2709 },2710 testDateTimeFormat_km_KH: function(test) {2711 test.expect(7);2712 var result1, result2, result3, result4;2713 result1 = new DateFmt({locale:"km-KH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2714 result2 = new DateFmt({locale:"km-KH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2715 result3 = new DateFmt({locale:"km-KH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2716 result4 = new DateFmt({locale:"km-KH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2717 test.equal(result1, "EEEE d MMMM yyyy");2718 test.equal(result2, "EEE d MMMM yyyy");2719 test.equal(result3, "EE d MMM yyyy");2720 test.equal(result4, "E d/M/yy");2721 result1 = new DateFmt({locale:"km-KH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2722 result2 = new DateFmt({locale:"km-KH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2723 test.equal(result1, "EEEE d MMMM yyyy áá
âáááá h:mm a");2724 test.equal(result2, "E d/M/yy, h:mm a");2725 result1 = new DateFmt({locale:"km-KH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2726 test.equal(result1, "h:mm:ss a z");2727 test.done();2728 },2729 testDateTimeFormat_si_LK: function(test) {2730 test.expect(7);2731 var result1, result2, result3, result4;2732 result1 = new DateFmt({locale:"si-LK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2733 result2 = new DateFmt({locale:"si-LK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2734 result3 = new DateFmt({locale:"si-LK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2735 result4 = new DateFmt({locale:"si-LK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2736 test.equal(result1, "yyyy MMMM d, EEEE");2737 test.equal(result2, "yyyy MMMM d, EEE");2738 test.equal(result3, "yyyy MMM d, EE");2739 test.equal(result4, "yyyy-MM-dd, E");2740 result1 = new DateFmt({locale:"si-LK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2741 result2 = new DateFmt({locale:"si-LK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2742 test.equal(result1, "yyyy MMMM d, EEEE HH.mm");2743 test.equal(result2, "yyyy-MM-dd, E HH.mm");2744 result1 = new DateFmt({locale:"si-LK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2745 test.equal(result1, "HH.mm.ss z");2746 test.done();2747 },2748 testDateTimeFormat_ar_AE: function(test) {2749 test.expect(7);2750 var result1, result2, result3, result4;2751 result1 = new DateFmt({locale:"ar-AE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2752 result2 = new DateFmt({locale:"ar-AE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2753 result3 = new DateFmt({locale:"ar-AE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2754 result4 = new DateFmt({locale:"ar-AE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2755 test.equal(result1, "EEEEØ d MMMM yyyy");2756 test.equal(result2, "EEEØ d MMMM yyyy");2757 test.equal(result3, 'EEØ dd/MM/yyyy');2758 test.equal(result4, 'EØ d/M/yyyy');2759 result1 = new DateFmt({locale:"ar-AE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2760 result2 = new DateFmt({locale:"ar-AE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2761 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2762 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2763 result1 = new DateFmt({locale:"ar-AE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2764 test.equal(result1,"âh:mm:ss a z");2765 test.done();2766 },2767 testDateTimeFormat_ar_BH: function(test) {2768 test.expect(7);2769 var result1, result2, result3, result4;2770 result1 = new DateFmt({locale:"ar-BH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2771 result2 = new DateFmt({locale:"ar-BH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2772 result3 = new DateFmt({locale:"ar-BH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2773 result4 = new DateFmt({locale:"ar-BH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2774 test.equal(result1, "EEEEØ d MMMM yyyy");2775 test.equal(result2, "EEEØ d MMMM yyyy");2776 test.equal(result3, 'EEØ dd/MM/yyyy');2777 test.equal(result4, 'EØ d/M/yyyy');2778 result1 = new DateFmt({locale:"ar-BH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2779 result2 = new DateFmt({locale:"ar-BH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2780 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2781 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2782 result1 = new DateFmt({locale:"ar-BH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2783 test.equal(result1,"âh:mm:ss a z");2784 test.done();2785 },2786 testDateTimeFormat_ar_DJ: function(test) {2787 test.expect(7);2788 var result1, result2, result3, result4;2789 result1 = new DateFmt({locale:"ar-DJ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2790 result2 = new DateFmt({locale:"ar-DJ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2791 result3 = new DateFmt({locale:"ar-DJ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2792 result4 = new DateFmt({locale:"ar-DJ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2793 test.equal(result1, "EEEEØ d MMMM yyyy");2794 test.equal(result2, "EEEØ d MMMM yyyy");2795 test.equal(result3, 'EEØ dd/MM/yyyy');2796 test.equal(result4, 'EØ d/M/yyyy');2797 result1 = new DateFmt({locale:"ar-DJ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2798 result2 = new DateFmt({locale:"ar-DJ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2799 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2800 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2801 result1 = new DateFmt({locale:"ar-DJ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2802 test.equal(result1,"âh:mm:ss a z");2803 test.done();2804 },2805 testDateTimeFormat_ar_DZ: function(test) {2806 test.expect(7);2807 var result1, result2, result3, result4;2808 result1 = new DateFmt({locale:"ar-DZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2809 result2 = new DateFmt({locale:"ar-DZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2810 result3 = new DateFmt({locale:"ar-DZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2811 result4 = new DateFmt({locale:"ar-DZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2812 test.equal(result1, "EEEEØ d MMMM yyyy");2813 test.equal(result2, "EEEØ d MMMM yyyy");2814 test.equal(result3, 'EEØ dd/MM/yyyy');2815 test.equal(result4, 'EØ d/M/yyyy');2816 result1 = new DateFmt({locale:"ar-DZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2817 result2 = new DateFmt({locale:"ar-DZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2818 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2819 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2820 result1 = new DateFmt({locale:"ar-DZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2821 test.equal(result1,"âh:mm:ss a z");2822 test.done();2823 },2824 testDateTimeFormat_ar_JO: function(test) {2825 test.expect(7);2826 var result1, result2, result3, result4;2827 result1 = new DateFmt({locale:"ar-JO", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2828 result2 = new DateFmt({locale:"ar-JO", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2829 result3 = new DateFmt({locale:"ar-JO", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2830 result4 = new DateFmt({locale:"ar-JO", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2831 test.equal(result1, "EEEEØ d MMMM yyyy");2832 test.equal(result2, "EEEØ d MMMM yyyy");2833 test.equal(result3, 'EEØ dd/MM/yyyy');2834 test.equal(result4, 'EØ d/M/yyyy');2835 result1 = new DateFmt({locale:"ar-JO", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2836 result2 = new DateFmt({locale:"ar-JO", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2837 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2838 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2839 result1 = new DateFmt({locale:"ar-JO", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2840 test.equal(result1,"âh:mm:ss a z");2841 test.done();2842 },2843 testDateTimeFormat_ar_KW: function(test) {2844 test.expect(7);2845 var result1, result2, result3, result4;2846 result1 = new DateFmt({locale:"ar-KW", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2847 result2 = new DateFmt({locale:"ar-KW", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2848 result3 = new DateFmt({locale:"ar-KW", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2849 result4 = new DateFmt({locale:"ar-KW", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2850 test.equal(result1, "EEEEØ d MMMM yyyy");2851 test.equal(result2, "EEEØ d MMMM yyyy");2852 test.equal(result3, 'EEØ dd/MM/yyyy');2853 test.equal(result4, 'EØ d/M/yyyy');2854 result1 = new DateFmt({locale:"ar-KW", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2855 result2 = new DateFmt({locale:"ar-KW", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2856 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2857 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2858 result1 = new DateFmt({locale:"ar-KW", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2859 test.equal(result1,"âh:mm:ss a z");2860 test.done();2861 },2862 testDateTimeFormat_ar_LB: function(test) {2863 test.expect(7);2864 var result1, result2, result3, result4;2865 result1 = new DateFmt({locale:"ar-LB", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2866 result2 = new DateFmt({locale:"ar-LB", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2867 result3 = new DateFmt({locale:"ar-LB", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2868 result4 = new DateFmt({locale:"ar-LB", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2869 test.equal(result1, "EEEEØ d MMMM yyyy");2870 test.equal(result2, "EEEØ d MMMM yyyy");2871 test.equal(result3, 'EEØ dd/MM/yyyy');2872 test.equal(result4, 'EØ d/M/yyyy');2873 result1 = new DateFmt({locale:"ar-LB", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2874 result2 = new DateFmt({locale:"ar-LB", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2875 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2876 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2877 result1 = new DateFmt({locale:"ar-LB", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2878 test.equal(result1,"âh:mm:ss a z");2879 test.done();2880 },2881 testDateTimeFormat_ar_LY: function(test) {2882 test.expect(7);2883 var result1, result2, result3, result4;2884 result1 = new DateFmt({locale:"ar-LY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2885 result2 = new DateFmt({locale:"ar-LY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2886 result3 = new DateFmt({locale:"ar-LY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2887 result4 = new DateFmt({locale:"ar-LY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2888 test.equal(result1, "EEEEØ d MMMM yyyy");2889 test.equal(result2, "EEEØ d MMMM yyyy");2890 test.equal(result3, 'EEØ dd/MM/yyyy');2891 test.equal(result4, 'EØ d/M/yyyy');2892 result1 = new DateFmt({locale:"ar-LY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2893 result2 = new DateFmt({locale:"ar-LY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2894 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2895 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2896 result1 = new DateFmt({locale:"ar-LY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2897 test.equal(result1,"âh:mm:ss a z");2898 test.done();2899 },2900 testDateTimeFormat_ar_MR: function(test) {2901 test.expect(7);2902 var result1, result2, result3, result4;2903 result1 = new DateFmt({locale:"ar-MR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2904 result2 = new DateFmt({locale:"ar-MR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2905 result3 = new DateFmt({locale:"ar-MR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2906 result4 = new DateFmt({locale:"ar-MR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2907 test.equal(result1, "EEEEØ d MMMM yyyy");2908 test.equal(result2, "EEEØ d MMMM yyyy");2909 test.equal(result3, 'EEØ dd/MM/yyyy');2910 test.equal(result4, 'EØ d/M/yyyy');2911 result1 = new DateFmt({locale:"ar-MR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2912 result2 = new DateFmt({locale:"ar-MR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2913 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2914 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2915 result1 = new DateFmt({locale:"ar-MR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2916 test.equal(result1,"âh:mm:ss a z");2917 test.done();2918 },2919 testDateTimeFormat_ar_OM: function(test) {2920 test.expect(7);2921 var result1, result2, result3, result4;2922 result1 = new DateFmt({locale:"ar-OM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2923 result2 = new DateFmt({locale:"ar-OM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2924 result3 = new DateFmt({locale:"ar-OM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2925 result4 = new DateFmt({locale:"ar-OM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2926 test.equal(result1, "EEEEØ d MMMM yyyy");2927 test.equal(result2, "EEEØ d MMMM yyyy");2928 test.equal(result3, 'EEØ dd/MM/yyyy');2929 test.equal(result4, 'EØ d/M/yyyy');2930 result1 = new DateFmt({locale:"ar-OM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2931 result2 = new DateFmt({locale:"ar-OM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2932 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2933 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2934 result1 = new DateFmt({locale:"ar-OM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2935 test.equal(result1,"âh:mm:ss a z");2936 test.done();2937 },2938 testDateTimeFormat_ar_QA: function(test) {2939 test.expect(7);2940 var result1, result2, result3, result4;2941 result1 = new DateFmt({locale:"ar-QA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2942 result2 = new DateFmt({locale:"ar-QA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2943 result3 = new DateFmt({locale:"ar-QA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2944 result4 = new DateFmt({locale:"ar-QA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2945 test.equal(result1, "EEEEØ d MMMM yyyy");2946 test.equal(result2, "EEEØ d MMMM yyyy");2947 test.equal(result3, 'EEØ dd/MM/yyyy');2948 test.equal(result4, 'EØ d/M/yyyy');2949 result1 = new DateFmt({locale:"ar-QA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2950 result2 = new DateFmt({locale:"ar-QA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2951 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2952 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2953 result1 = new DateFmt({locale:"ar-QA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2954 test.equal(result1,"âh:mm:ss a z");2955 test.done();2956 },2957 testDateTimeFormat_ar_SA: function(test) {2958 test.expect(7);2959 var result1, result2, result3, result4;2960 result1 = new DateFmt({locale:"ar-SA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2961 result2 = new DateFmt({locale:"ar-SA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2962 result3 = new DateFmt({locale:"ar-SA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2963 result4 = new DateFmt({locale:"ar-SA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2964 test.equal(result1, "EEEEØ d MMMM yyyy");2965 test.equal(result2, "EEEØ d MMMM yyyy");2966 test.equal(result3, 'EEØ dd/MM/yyyy');2967 test.equal(result4, 'EØ d/M/yyyy');2968 result1 = new DateFmt({locale:"ar-SA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2969 result2 = new DateFmt({locale:"ar-SA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2970 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2971 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2972 result1 = new DateFmt({locale:"ar-SA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2973 test.equal(result1,"âh:mm:ss a z");2974 test.done();2975 },2976 testDateTimeFormat_ar_SD: function(test) {2977 test.expect(7);2978 var result1, result2, result3, result4;2979 result1 = new DateFmt({locale:"ar-SD", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2980 result2 = new DateFmt({locale:"ar-SD", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;2981 result3 = new DateFmt({locale:"ar-SD", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;2982 result4 = new DateFmt({locale:"ar-SD", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2983 test.equal(result1, "EEEEØ d MMMM yyyy");2984 test.equal(result2, "EEEØ d MMMM yyyy");2985 test.equal(result3, 'EEØ dd/MM/yyyy');2986 test.equal(result4, 'EØ d/M/yyyy');2987 result1 = new DateFmt({locale:"ar-SD", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2988 result2 = new DateFmt({locale:"ar-SD", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;2989 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");2990 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');2991 result1 = new DateFmt({locale:"ar-SD", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;2992 test.equal(result1,"âh:mm:ss a z");2993 test.done();2994 },2995 testDateTimeFormat_ar_SY: function(test) {2996 test.expect(7);2997 var result1, result2, result3, result4;2998 result1 = new DateFmt({locale:"ar-SY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;2999 result2 = new DateFmt({locale:"ar-SY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3000 result3 = new DateFmt({locale:"ar-SY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3001 result4 = new DateFmt({locale:"ar-SY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3002 test.equal(result1, "EEEEØ d MMMM yyyy");3003 test.equal(result2, "EEEØ d MMMM yyyy");3004 test.equal(result3, 'EEØ dd/MM/yyyy');3005 test.equal(result4, 'EØ d/M/yyyy');3006 result1 = new DateFmt({locale:"ar-SY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3007 result2 = new DateFmt({locale:"ar-SY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3008 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");3009 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');3010 result1 = new DateFmt({locale:"ar-SY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3011 test.equal(result1,"âh:mm:ss a z");3012 test.done();3013 },3014 testDateTimeFormat_ar_TN: function(test) {3015 test.expect(7);3016 var result1, result2, result3, result4;3017 result1 = new DateFmt({locale:"ar-TN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3018 result2 = new DateFmt({locale:"ar-TN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3019 result3 = new DateFmt({locale:"ar-TN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3020 result4 = new DateFmt({locale:"ar-TN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3021 test.equal(result1, "EEEEØ d MMMM yyyy");3022 test.equal(result2, "EEEØ d MMMM yyyy");3023 test.equal(result3, 'EEØ dd/MM/yyyy');3024 test.equal(result4, 'EØ d/M/yyyy');3025 result1 = new DateFmt({locale:"ar-TN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3026 result2 = new DateFmt({locale:"ar-TN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3027 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");3028 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');3029 result1 = new DateFmt({locale:"ar-TN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3030 test.equal(result1,"âh:mm:ss a z");3031 test.done();3032 },3033 testDateTimeFormat_ar_YE: function(test) {3034 test.expect(7);3035 var result1, result2, result3, result4;3036 result1 = new DateFmt({locale:"ar-YE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3037 result2 = new DateFmt({locale:"ar-YE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3038 result3 = new DateFmt({locale:"ar-YE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3039 result4 = new DateFmt({locale:"ar-YE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3040 test.equal(result1, "EEEEØ d MMMM yyyy");3041 test.equal(result2, "EEEØ d MMMM yyyy");3042 test.equal(result3, 'EEØ dd/MM/yyyy');3043 test.equal(result4, 'EØ d/M/yyyy');3044 result1 = new DateFmt({locale:"ar-YE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3045 result2 = new DateFmt({locale:"ar-YE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3046 test.equal(result1, "EEEEØ d MMMM yyyy ÙÙ âh:mm a");3047 test.equal(result2, 'EØ d/M/yyyy, âh:mm a');3048 result1 = new DateFmt({locale:"ar-YE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3049 test.equal(result1,"âh:mm:ss a z");3050 test.done();3051 },3052 testDateTimeFormat_en_ET: function(test) {3053 test.expect(7);3054 // CLDR data from en/ca-ethiopic.json3055 var result1, result2, result3, result4;3056 result1 = new DateFmt({locale:"en-ET", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3057 result2 = new DateFmt({locale:"en-ET", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3058 result3 = new DateFmt({locale:"en-ET", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3059 result4 = new DateFmt({locale:"en-ET", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3060 test.equal(result1, "EEEE, MMMM d, yyyy");3061 test.equal(result2, "EEE, MMMM d, yyyy");3062 test.equal(result3, "EE, MMM d, yyyy");3063 test.equal(result4, "E, M/d/yyyy");3064 result1 = new DateFmt({locale:"en-ET", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3065 result2 = new DateFmt({locale:"en-ET", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3066 test.equal(result1, "EEEE, MMMM d, yyyy 'at' h:mm a");3067 test.equal(result2, "E, M/d/yyyy, h:mm a");3068 result1 = new DateFmt({locale:"en-ET", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3069 test.equal(result1, "h:mm:ss a z");3070 test.done();3071 },3072 testDateTimeFormat_en_GM: function(test) {3073 test.expect(7);3074 var result1, result2, result3, result4;3075 result1 = new DateFmt({locale:"en-GM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3076 result2 = new DateFmt({locale:"en-GM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3077 result3 = new DateFmt({locale:"en-GM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3078 result4 = new DateFmt({locale:"en-GM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3079 test.equal(result1, "EEEE, d MMMM yyyy");3080 test.equal(result2, "EEE, d MMMM yyyy");3081 test.equal(result3, "EE, d MMM yyyy");3082 test.equal(result4, "E, dd/MM/yyyy");3083 result1 = new DateFmt({locale:"en-GM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3084 result2 = new DateFmt({locale:"en-GM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3085 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");3086 test.equal(result2, "E, dd/MM/yyyy, h:mm a");3087 result1 = new DateFmt({locale:"en-GM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3088 test.equal(result1, "h:mm:ss a z");3089 test.done();3090 },3091 testDateTimeFormat_en_LR: function(test) {3092 test.expect(7);3093 var result1, result2, result3, result4;3094 result1 = new DateFmt({locale:"en-LR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3095 result2 = new DateFmt({locale:"en-LR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3096 result3 = new DateFmt({locale:"en-LR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3097 result4 = new DateFmt({locale:"en-LR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3098 test.equal(result1, "EEEE, d MMMM yyyy");3099 test.equal(result2, "EEE, d MMMM yyyy");3100 test.equal(result3, "EE, d MMM yyyy");3101 test.equal(result4, "E, dd/MM/yyyy");3102 result1 = new DateFmt({locale:"en-LR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3103 result2 = new DateFmt({locale:"en-LR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3104 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");3105 test.equal(result2, "E, dd/MM/yyyy, h:mm a");3106 result1 = new DateFmt({locale:"en-LR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3107 test.equal(result1, "h:mm:ss a z");3108 test.done();3109 },3110 testDateTimeFormat_en_PK: function(test) {3111 test.expect(7);3112 var result1, result2, result3, result4;3113 result1 = new DateFmt({locale:"en-PK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3114 result2 = new DateFmt({locale:"en-PK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3115 result3 = new DateFmt({locale:"en-PK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3116 result4 = new DateFmt({locale:"en-PK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3117 test.equal(result1, "EEEE, d MMMM yyyy");3118 test.equal(result2, "EEE, d MMMM yyyy");3119 test.equal(result3, "EE, dd-MMM-yyyy");3120 test.equal(result4, "E, dd/MM/yyyy");3121 result1 = new DateFmt({locale:"en-PK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3122 result2 = new DateFmt({locale:"en-PK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3123 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");3124 test.equal(result2, "E, dd/MM/yyyy, h:mm a");3125 result1 = new DateFmt({locale:"en-PK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3126 test.equal(result1, "h:mm:ss a z");3127 test.done();3128 },3129 testDateTimeFormat_en_RW: function(test) {3130 test.expect(7);3131 var result1, result2, result3, result4;3132 result1 = new DateFmt({locale:"en-RW", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3133 result2 = new DateFmt({locale:"en-RW", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3134 result3 = new DateFmt({locale:"en-RW", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3135 result4 = new DateFmt({locale:"en-RW", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3136 test.equal(result1, "EEEE, d MMMM yyyy");3137 test.equal(result2, "EEE, d MMMM yyyy");3138 test.equal(result3, "EE, d MMM yyyy");3139 test.equal(result4, "E, dd/MM/yyyy");3140 result1 = new DateFmt({locale:"en-RW", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3141 result2 = new DateFmt({locale:"en-RW", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3142 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");3143 test.equal(result2, "E, dd/MM/yyyy, h:mm a");3144 result1 = new DateFmt({locale:"en-RW", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3145 test.equal(result1, "h:mm:ss a z");3146 test.done();3147 },3148 testDateTimeFormat_en_SD: function(test) {3149 test.expect(7);3150 var result1, result2, result3, result4;3151 result1 = new DateFmt({locale:"en-SD", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3152 result2 = new DateFmt({locale:"en-SD", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3153 result3 = new DateFmt({locale:"en-SD", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3154 result4 = new DateFmt({locale:"en-SD", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3155 test.equal(result1, "EEEE, d MMMM yyyy");3156 test.equal(result2, "EEE, d MMMM yyyy");3157 test.equal(result3, "EE, d MMM yyyy");3158 test.equal(result4, "E, dd/MM/yyyy");3159 result1 = new DateFmt({locale:"en-SD", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3160 result2 = new DateFmt({locale:"en-SD", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3161 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");3162 test.equal(result2, "E, dd/MM/yyyy, h:mm a");3163 result1 = new DateFmt({locale:"en-SD", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3164 test.equal(result1, "h:mm:ss a z");3165 test.done();3166 },3167 testDateTimeFormat_en_SL: function(test) {3168 test.expect(7);3169 var result1, result2, result3, result4;3170 result1 = new DateFmt({locale:"en-SL", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3171 result2 = new DateFmt({locale:"en-SL", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3172 result3 = new DateFmt({locale:"en-SL", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3173 result4 = new DateFmt({locale:"en-SL", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3174 test.equal(result1, "EEEE, d MMMM yyyy");3175 test.equal(result2, "EEE, d MMMM yyyy");3176 test.equal(result3, "EE, d MMM yyyy");3177 test.equal(result4, "E, dd/MM/yyyy");3178 result1 = new DateFmt({locale:"en-SL", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3179 result2 = new DateFmt({locale:"en-SL", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3180 test.equal(result1, "EEEE, d MMMM yyyy 'at' h:mm a");3181 test.equal(result2, "E, dd/MM/yyyy, h:mm a");3182 result1 = new DateFmt({locale:"en-SL", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3183 test.equal(result1,"h:mm:ss a z");3184 test.done();3185 },3186 testDateTimeFormat_en_TZ: function(test) {3187 test.expect(7);3188 var result1, result2, result3, result4;3189 result1 = new DateFmt({locale:"en-TZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3190 result2 = new DateFmt({locale:"en-TZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3191 result3 = new DateFmt({locale:"en-TZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3192 result4 = new DateFmt({locale:"en-TZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3193 test.equal(result1, "EEEE, d MMMM yyyy");3194 test.equal(result2, "EEE, d MMMM yyyy");3195 test.equal(result3, "EE, d MMM yyyy");3196 test.equal(result4, "E, dd/MM/yyyy");3197 result1 = new DateFmt({locale:"en-TZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3198 result2 = new DateFmt({locale:"en-TZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3199 test.equal(result1, "EEEE, d MMMM yyyy 'at' HH:mm");3200 test.equal(result2, "E, dd/MM/yyyy, HH:mm");3201 result1 = new DateFmt({locale:"en-TZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3202 test.equal(result1, "HH:mm:ss z");3203 test.done();3204 },3205 testDateTimeFormat_es_CR: function(test) {3206 test.expect(7);3207 var result1, result2, result3, result4;3208 result1 = new DateFmt({locale:"es-CR", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3209 result2 = new DateFmt({locale:"es-CR", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3210 result3 = new DateFmt({locale:"es-CR", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3211 result4 = new DateFmt({locale:"es-CR", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3212 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");3213 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");3214 test.equal(result3, "EE, d MMM yyyy");3215 test.equal(result4, "E, d/M/yy");3216 result1 = new DateFmt({locale:"es-CR", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3217 result2 = new DateFmt({locale:"es-CR", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3218 test.equal(result1, 'EEEE, d \'de\' MMMM \'de\' yyyy, HH:mm');3219 test.equal(result2, "E, d/M/yy, HH:mm");3220 result1 = new DateFmt({locale:"es-CR", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3221 test.equal(result1, "HH:mm:ss z");3222 test.done();3223 },3224 testDateTimeFormat_es_GQ: function(test) {3225 test.expect(7);3226 var result1, result2, result3, result4;3227 result1 = new DateFmt({locale:"es-GQ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3228 result2 = new DateFmt({locale:"es-GQ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3229 result3 = new DateFmt({locale:"es-GQ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3230 result4 = new DateFmt({locale:"es-GQ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3231 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");3232 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");3233 test.equal(result3, "EE, d MMM yyyy");3234 test.equal(result4, "E, d/M/yy");3235 result1 = new DateFmt({locale:"es-GQ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3236 result2 = new DateFmt({locale:"es-GQ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3237 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy, H:mm");3238 test.equal(result2, "E, d/M/yy, H:mm");3239 result1 = new DateFmt({locale:"es-GQ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3240 test.equal(result1, "H:mm:ss z");3241 test.done();3242 },3243 testDateTimeFormat_es_PH: function(test) {3244 test.expect(7);3245 var result1, result2, result3, result4;3246 result1 = new DateFmt({locale:"es-PH", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3247 result2 = new DateFmt({locale:"es-PH", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3248 result3 = new DateFmt({locale:"es-PH", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3249 result4 = new DateFmt({locale:"es-PH", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3250 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");3251 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");3252 test.equal(result3, "EE, d MMM yyyy");3253 test.equal(result4, "E, d/M/yy");3254 result1 = new DateFmt({locale:"es-PH", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3255 result2 = new DateFmt({locale:"es-PH", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3256 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy, h:mm a");3257 test.equal(result2, "E, d/M/yy, h:mm a");3258 result1 = new DateFmt({locale:"es-PH", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3259 test.equal(result1, "h:mm:ss a z");3260 test.done();3261 },3262 testDateTimeFormat_fr_BF: function(test) {3263 test.expect(7);3264 var result1, result2, result3, result4;3265 result1 = new DateFmt({locale:"fr-BF", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3266 result2 = new DateFmt({locale:"fr-BF", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3267 result3 = new DateFmt({locale:"fr-BF", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3268 result4 = new DateFmt({locale:"fr-BF", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3269 test.equal(result1, "EEEE d MMMM yyyy");3270 test.equal(result2, "EEE d MMMM yyyy");3271 test.equal(result3, "EE d MMM yyyy");3272 test.equal(result4, "E dd/MM/yyyy");3273 result1 = new DateFmt({locale:"fr-BF", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3274 result2 = new DateFmt({locale:"fr-BF", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3275 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3276 test.equal(result2, "E dd/MM/yyyy HH:mm");3277 result1 = new DateFmt({locale:"fr-BF", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3278 test.equal(result1, "HH:mm:ss z");3279 test.done();3280 },3281 testDateTimeFormat_fr_BJ: function(test) {3282 test.expect(7);3283 var result1, result2, result3, result4;3284 result1 = new DateFmt({locale:"fr-BJ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3285 result2 = new DateFmt({locale:"fr-BJ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3286 result3 = new DateFmt({locale:"fr-BJ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3287 result4 = new DateFmt({locale:"fr-BJ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3288 test.equal(result1, "EEEE d MMMM yyyy");3289 test.equal(result2, "EEE d MMMM yyyy");3290 test.equal(result3, "EE d MMM yyyy");3291 test.equal(result4, "E dd/MM/yyyy");3292 result1 = new DateFmt({locale:"fr-BJ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3293 result2 = new DateFmt({locale:"fr-BJ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3294 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3295 test.equal(result2, "E dd/MM/yyyy HH:mm");3296 result1 = new DateFmt({locale:"fr-BJ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3297 test.equal(result1, "HH:mm:ss z");3298 test.done();3299 },3300 testDateTimeFormat_fr_CD: function(test) {3301 test.expect(7);3302 var result1, result2, result3, result4;3303 result1 = new DateFmt({locale:"fr-CD", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3304 result2 = new DateFmt({locale:"fr-CD", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3305 result3 = new DateFmt({locale:"fr-CD", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3306 result4 = new DateFmt({locale:"fr-CD", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3307 test.equal(result1, "EEEE d MMMM yyyy");3308 test.equal(result2, "EEE d MMMM yyyy");3309 test.equal(result3, "EE d MMM yyyy");3310 test.equal(result4, "E dd/MM/yyyy");3311 result1 = new DateFmt({locale:"fr-CD", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3312 result2 = new DateFmt({locale:"fr-CD", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3313 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3314 test.equal(result2, "E dd/MM/yyyy HH:mm");3315 result1 = new DateFmt({locale:"fr-CD", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3316 test.equal(result1, "HH:mm:ss z");3317 test.done();3318 },3319 testDateTimeFormat_fr_CF: function(test) {3320 test.expect(7);3321 var result1, result2, result3, result4;3322 result1 = new DateFmt({locale:"fr-CF", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3323 result2 = new DateFmt({locale:"fr-CF", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3324 result3 = new DateFmt({locale:"fr-CF", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3325 result4 = new DateFmt({locale:"fr-CF", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3326 test.equal(result1, "EEEE d MMMM yyyy");3327 test.equal(result2, "EEE d MMMM yyyy");3328 test.equal(result3, "EE d MMM yyyy");3329 test.equal(result4, "E dd/MM/yyyy");3330 result1 = new DateFmt({locale:"fr-CF", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3331 result2 = new DateFmt({locale:"fr-CF", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3332 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3333 test.equal(result2, "E dd/MM/yyyy HH:mm");3334 result1 = new DateFmt({locale:"fr-CF", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3335 test.equal(result1, "HH:mm:ss z");3336 test.done();3337 },3338 testDateTimeFormat_fr_CG: function(test) {3339 test.expect(7);3340 var result1, result2, result3, result4;3341 result1 = new DateFmt({locale:"fr-CG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3342 result2 = new DateFmt({locale:"fr-CG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3343 result3 = new DateFmt({locale:"fr-CG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3344 result4 = new DateFmt({locale:"fr-CG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3345 test.equal(result1, "EEEE d MMMM yyyy");3346 test.equal(result2, "EEE d MMMM yyyy");3347 test.equal(result3, "EE d MMM yyyy");3348 test.equal(result4, "E dd/MM/yyyy");3349 result1 = new DateFmt({locale:"fr-CG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3350 result2 = new DateFmt({locale:"fr-CG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3351 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3352 test.equal(result2, "E dd/MM/yyyy HH:mm");3353 result1 = new DateFmt({locale:"fr-CG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3354 test.equal(result1, "HH:mm:ss z");3355 test.done();3356 },3357 testDateTimeFormat_fr_CI: function(test) {3358 test.expect(7);3359 var result1, result2, result3, result4;3360 result1 = new DateFmt({locale:"fr-CI", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3361 result2 = new DateFmt({locale:"fr-CI", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3362 result3 = new DateFmt({locale:"fr-CI", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3363 result4 = new DateFmt({locale:"fr-CI", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3364 test.equal(result1, "EEEE d MMMM yyyy");3365 test.equal(result2, "EEE d MMMM yyyy");3366 test.equal(result3, "EE d MMM yyyy");3367 test.equal(result4, "E dd/MM/yyyy");3368 result1 = new DateFmt({locale:"fr-CI", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3369 result2 = new DateFmt({locale:"fr-CI", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3370 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3371 test.equal(result2, "E dd/MM/yyyy HH:mm");3372 result1 = new DateFmt({locale:"fr-CI", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3373 test.equal(result1, "HH:mm:ss z");3374 test.done();3375 },3376 testDateTimeFormat_fr_CM: function(test) {3377 test.expect(7);3378 var result1, result2, result3, result4;3379 result1 = new DateFmt({locale:"fr-CM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3380 result2 = new DateFmt({locale:"fr-CM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3381 result3 = new DateFmt({locale:"fr-CM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3382 result4 = new DateFmt({locale:"fr-CM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3383 test.equal(result1, "EEEE d MMMM yyyy");3384 test.equal(result2, "EEE d MMMM yyyy");3385 test.equal(result3, "EE d MMM yyyy");3386 test.equal(result4, "E dd/MM/yyyy");3387 result1 = new DateFmt({locale:"fr-CM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3388 result2 = new DateFmt({locale:"fr-CM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3389 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3390 test.equal(result2, "E dd/MM/yyyy HH:mm");3391 result1 = new DateFmt({locale:"fr-CM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3392 test.equal(result1, "HH:mm:ss z");3393 test.done();3394 },3395 testDateTimeFormat_fr_GQ: function(test) {3396 test.expect(7);3397 var result1, result2, result3, result4;3398 result1 = new DateFmt({locale:"fr-GQ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3399 result2 = new DateFmt({locale:"fr-GQ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3400 result3 = new DateFmt({locale:"fr-GQ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3401 result4 = new DateFmt({locale:"fr-GQ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3402 test.equal(result1, "EEEE d MMMM yyyy");3403 test.equal(result2, "EEE d MMMM yyyy");3404 test.equal(result3, "EE d MMM yyyy");3405 test.equal(result4, "E dd/MM/yyyy");3406 result1 = new DateFmt({locale:"fr-GQ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3407 result2 = new DateFmt({locale:"fr-GQ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3408 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3409 test.equal(result2, "E dd/MM/yyyy HH:mm");3410 result1 = new DateFmt({locale:"fr-GQ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3411 test.equal(result1, "HH:mm:ss z");3412 test.done();3413 },3414 testDateTimeFormat_fr_DJ: function(test) {3415 test.expect(7);3416 var result1, result2, result3, result4;3417 result1 = new DateFmt({locale:"fr-DJ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3418 result2 = new DateFmt({locale:"fr-DJ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3419 result3 = new DateFmt({locale:"fr-DJ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3420 result4 = new DateFmt({locale:"fr-DJ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3421 test.equal(result1, "EEEE d MMMM yyyy");3422 test.equal(result2, "EEE d MMMM yyyy");3423 test.equal(result3, "EE d MMM yyyy");3424 test.equal(result4, "E dd/MM/yyyy");3425 result1 = new DateFmt({locale:"fr-DJ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3426 result2 = new DateFmt({locale:"fr-DJ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3427 test.equal(result1, "EEEE d MMMM yyyy 'à ' h:mm a");3428 test.equal(result2, "E dd/MM/yyyy h:mm a");3429 result1 = new DateFmt({locale:"fr-DJ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3430 test.equal(result1, "h:mm:ss a z");3431 test.done();3432 },3433 testDateTimeFormat_fr_DZ: function(test) {3434 test.expect(7);3435 var result1, result2, result3, result4;3436 result1 = new DateFmt({locale:"fr-DZ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3437 result2 = new DateFmt({locale:"fr-DZ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3438 result3 = new DateFmt({locale:"fr-DZ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3439 result4 = new DateFmt({locale:"fr-DZ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3440 test.equal(result1, "EEEE d MMMM yyyy");3441 test.equal(result2, "EEE d MMMM yyyy");3442 test.equal(result3, "EE d MMM yyyy");3443 test.equal(result4, "E dd/MM/yyyy");3444 result1 = new DateFmt({locale:"fr-DZ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3445 result2 = new DateFmt({locale:"fr-DZ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3446 test.equal(result1, "EEEE d MMMM yyyy 'à ' h:mm a");3447 test.equal(result2, "E dd/MM/yyyy h:mm a");3448 result1 = new DateFmt({locale:"fr-DZ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3449 test.equal(result1, "h:mm:ss a z");3450 test.done();3451 },3452 testDateTimeFormat_fr_GA: function(test) {3453 test.expect(7);3454 var result1, result2, result3, result4;3455 result1 = new DateFmt({locale:"fr-GA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3456 result2 = new DateFmt({locale:"fr-GA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3457 result3 = new DateFmt({locale:"fr-GA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3458 result4 = new DateFmt({locale:"fr-GA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3459 test.equal(result1, "EEEE d MMMM yyyy");3460 test.equal(result2, "EEE d MMMM yyyy");3461 test.equal(result3, "EE d MMM yyyy");3462 test.equal(result4, "E dd/MM/yyyy");3463 result1 = new DateFmt({locale:"fr-GA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3464 result2 = new DateFmt({locale:"fr-GA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3465 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3466 test.equal(result2, "E dd/MM/yyyy HH:mm");3467 result1 = new DateFmt({locale:"fr-GA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3468 test.equal(result1, "HH:mm:ss z");3469 test.done();3470 },3471 testDateTimeFormat_fr_GN: function(test) {3472 test.expect(7);3473 var result1, result2, result3, result4;3474 result1 = new DateFmt({locale:"fr-GN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3475 result2 = new DateFmt({locale:"fr-GN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3476 result3 = new DateFmt({locale:"fr-GN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3477 result4 = new DateFmt({locale:"fr-GN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3478 test.equal(result1, "EEEE d MMMM yyyy");3479 test.equal(result2, "EEE d MMMM yyyy");3480 test.equal(result3, "EE d MMM yyyy");3481 test.equal(result4, "E dd/MM/yyyy");3482 result1 = new DateFmt({locale:"fr-GN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3483 result2 = new DateFmt({locale:"fr-GN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3484 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3485 test.equal(result2, "E dd/MM/yyyy HH:mm");3486 result1 = new DateFmt({locale:"fr-GN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3487 test.equal(result1, "HH:mm:ss z");3488 test.done();3489 },3490 testDateTimeFormat_fr_LB: function(test) {3491 test.expect(7);3492 var result1, result2, result3, result4;3493 result1 = new DateFmt({locale:"fr-LB", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3494 result2 = new DateFmt({locale:"fr-LB", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3495 result3 = new DateFmt({locale:"fr-LB", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3496 result4 = new DateFmt({locale:"fr-LB", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3497 test.equal(result1, "EEEE d MMMM yyyy");3498 test.equal(result2, "EEE d MMMM yyyy");3499 test.equal(result3, "EE d MMM yyyy");3500 test.equal(result4, "E dd/MM/yyyy");3501 result1 = new DateFmt({locale:"fr-LB", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3502 result2 = new DateFmt({locale:"fr-LB", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3503 test.equal(result1, "EEEE d MMMM yyyy 'à ' h:mm a");3504 test.equal(result2,"E dd/MM/yyyy h:mm a");3505 result1 = new DateFmt({locale:"fr-LB", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3506 test.equal(result1, "h:mm:ss a z");3507 test.done();3508 },3509 testDateTimeFormat_fr_ML: function(test) {3510 test.expect(7);3511 var result1, result2, result3, result4;3512 result1 = new DateFmt({locale:"fr-ML", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3513 result2 = new DateFmt({locale:"fr-ML", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3514 result3 = new DateFmt({locale:"fr-ML", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3515 result4 = new DateFmt({locale:"fr-ML", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3516 test.equal(result1, "EEEE d MMMM yyyy");3517 test.equal(result2, "EEE d MMMM yyyy");3518 test.equal(result3, "EE d MMM yyyy");3519 test.equal(result4, "E dd/MM/yyyy");3520 result1 = new DateFmt({locale:"fr-ML", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3521 result2 = new DateFmt({locale:"fr-ML", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3522 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3523 test.equal(result2, "E dd/MM/yyyy, HH:mm");3524 result1 = new DateFmt({locale:"fr-ML", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3525 test.equal(result1, "HH:mm:ss z");3526 test.done();3527 },3528 testDateTimeFormat_fr_RW: function(test) {3529 test.expect(7);3530 var result1, result2, result3, result4;3531 result1 = new DateFmt({locale:"fr-RW", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3532 result2 = new DateFmt({locale:"fr-RW", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3533 result3 = new DateFmt({locale:"fr-RW", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3534 result4 = new DateFmt({locale:"fr-RW", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3535 test.equal(result1, "EEEE d MMMM yyyy");3536 test.equal(result2, "EEE d MMMM yyyy");3537 test.equal(result3, "EE d MMM yyyy");3538 test.equal(result4, "E dd/MM/yyyy");3539 result1 = new DateFmt({locale:"fr-RW", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3540 result2 = new DateFmt({locale:"fr-RW", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3541 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3542 test.equal(result2, "E dd/MM/yyyy HH:mm");3543 result1 = new DateFmt({locale:"fr-RW", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3544 test.equal(result1, "HH:mm:ss z");3545 test.done();3546 },3547 testDateTimeFormat_fr_SN: function(test) {3548 test.expect(7);3549 var result1, result2, result3, result4;3550 result1 = new DateFmt({locale:"fr-SN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3551 result2 = new DateFmt({locale:"fr-SN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3552 result3 = new DateFmt({locale:"fr-SN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3553 result4 = new DateFmt({locale:"fr-SN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3554 test.equal(result1, "EEEE d MMMM yyyy");3555 test.equal(result2, "EEE d MMMM yyyy");3556 test.equal(result3, "EE d MMM yyyy");3557 test.equal(result4, "E dd/MM/yyyy");3558 result1 = new DateFmt({locale:"fr-SN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3559 result2 = new DateFmt({locale:"fr-SN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3560 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3561 test.equal(result2, "E dd/MM/yyyy HH:mm");3562 result1 = new DateFmt({locale:"fr-SN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3563 test.equal(result1, "HH:mm:ss z");3564 test.done();3565 },3566 testDateTimeFormat_fr_TG: function(test) {3567 test.expect(7);3568 var result1, result2, result3, result4;3569 result1 = new DateFmt({locale:"fr-TG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3570 result2 = new DateFmt({locale:"fr-TG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3571 result3 = new DateFmt({locale:"fr-TG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3572 result4 = new DateFmt({locale:"fr-TG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3573 test.equal(result1, "EEEE d MMMM yyyy");3574 test.equal(result2, "EEE d MMMM yyyy");3575 test.equal(result3, "EE d MMM yyyy");3576 test.equal(result4, "E dd/MM/yyyy");3577 result1 = new DateFmt({locale:"fr-TG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3578 result2 = new DateFmt({locale:"fr-TG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3579 test.equal(result1, "EEEE d MMMM yyyy 'à ' HH:mm");3580 test.equal(result2, "E dd/MM/yyyy HH:mm");3581 result1 = new DateFmt({locale:"fr-TG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3582 test.equal(result1, "HH:mm:ss z");3583 test.done();3584 },3585 testDateTimeFormat_ms_SG: function(test) {3586 test.expect(7);3587 var result1, result2, result3, result4;3588 result1 = new DateFmt({locale:"ms-SG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3589 result2 = new DateFmt({locale:"ms-SG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3590 result3 = new DateFmt({locale:"ms-SG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3591 result4 = new DateFmt({locale:"ms-SG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3592 test.equal(result1, "EEEE, d MMMM yyyy");3593 test.equal(result2, "EEE, d MMMM yyyy");3594 test.equal(result3, "EE, d MMM yyyy");3595 test.equal(result4, "E, d/MM/yy");3596 result1 = new DateFmt({locale:"ms-SG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3597 result2 = new DateFmt({locale:"ms-SG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3598 test.equal(result1, "EEEE, d MMMM yyyy h:mm a");3599 test.equal(result2, "E, d/MM/yy, h:mm a");3600 result1 = new DateFmt({locale:"ms-SG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3601 test.equal(result1, "h:mm:ss a z");3602 test.done();3603 },3604 testDateTimeFormat_pa_PK: function(test) {3605 test.expect(7);3606 var result1, result2, result3, result4;3607 result1 = new DateFmt({locale:"pa-PK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3608 result2 = new DateFmt({locale:"pa-PK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3609 result3 = new DateFmt({locale:"pa-PK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3610 result4 = new DateFmt({locale:"pa-PK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3611 test.equal(result1, "EEEE, d MMMM yyyy");3612 test.equal(result2, "EEE, d MMMM yyyy");3613 test.equal(result3, "EE, d MMM yyyy");3614 test.equal(result4, "E, d/M/yy");3615 result1 = new DateFmt({locale:"pa-PK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3616 result2 = new DateFmt({locale:"pa-PK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3617 test.equal(result1, "EEEE, d MMMM yyyy h:mm a");3618 test.equal(result2, "E, d/M/yy, h:mm a");3619 result1 = new DateFmt({locale:"pa-PK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3620 test.equal(result1, "h:mm:ss a z");3621 test.done();3622 },3623 testDateTimeFormat_pt_AO: function(test) {3624 test.expect(7);3625 var result1, result2, result3, result4;3626 result1 = new DateFmt({locale:"pt-AO", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3627 result2 = new DateFmt({locale:"pt-AO", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3628 result3 = new DateFmt({locale:"pt-AO", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3629 result4 = new DateFmt({locale:"pt-AO", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3630 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");3631 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");3632 test.equal(result3, "EE, dd/MM/yyyy");3633 test.equal(result4, "E, dd/MM/yy");3634 result1 = new DateFmt({locale:"pt-AO", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3635 result2 = new DateFmt({locale:"pt-AO", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3636 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy 'à s' HH:mm");3637 test.equal(result2, "E, dd/MM/yy, HH:mm");3638 result1 = new DateFmt({locale:"pt-AO", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3639 test.equal(result1, "HH:mm:ss z");3640 test.done();3641 },3642 testDateTimeFormat_pt_GQ: function(test) {3643 test.expect(7);3644 var result1, result2, result3, result4;3645 result1 = new DateFmt({locale:"pt-GQ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3646 result2 = new DateFmt({locale:"pt-GQ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3647 result3 = new DateFmt({locale:"pt-GQ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3648 result4 = new DateFmt({locale:"pt-GQ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3649 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");3650 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");3651 test.equal(result3, "EE, dd/MM/yyyy");3652 test.equal(result4, "E, dd/MM/yy");3653 result1 = new DateFmt({locale:"pt-GQ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3654 result2 = new DateFmt({locale:"pt-GQ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3655 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy 'à s' HH:mm");3656 test.equal(result2, "E, dd/MM/yy, HH:mm");3657 result1 = new DateFmt({locale:"pt-GQ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3658 test.equal(result1, "HH:mm:ss z");3659 test.done();3660 },3661 testDateTimeFormat_pt_CV: function(test) {3662 test.expect(7);3663 var result1, result2, result3, result4;3664 result1 = new DateFmt({locale:"pt-CV", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3665 result2 = new DateFmt({locale:"pt-CV", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3666 result3 = new DateFmt({locale:"pt-CV", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3667 result4 = new DateFmt({locale:"pt-CV", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3668 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy");3669 test.equal(result2, "EEE, d 'de' MMMM 'de' yyyy");3670 test.equal(result3, "EE, dd/MM/yyyy");3671 test.equal(result4, "E, dd/MM/yy");3672 result1 = new DateFmt({locale:"pt-CV", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3673 result2 = new DateFmt({locale:"pt-CV", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3674 test.equal(result1, "EEEE, d 'de' MMMM 'de' yyyy 'à s' HH:mm");3675 test.equal(result2, "E, dd/MM/yy, HH:mm");3676 result1 = new DateFmt({locale:"pt-CV", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3677 test.equal(result1, "HH:mm:ss z");3678 test.done();3679 },3680 testDateTimeFormat_ur_PK: function(test) {3681 test.expect(7);3682 var result1, result2, result3, result4;3683 result1 = new DateFmt({locale:"ur-PK", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3684 result2 = new DateFmt({locale:"ur-PK", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3685 result3 = new DateFmt({locale:"ur-PK", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3686 result4 = new DateFmt({locale:"ur-PK", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3687 test.equal(result1, "EEEEØ d MMMMØ yyyy");3688 test.equal(result2, 'EEEØ d MMMMØ yyyy');3689 test.equal(result3, 'EEØ d MMMØ yyyy'); //// CLDR 34 change3690 test.equal(result4, 'EØ d/M/yy');3691 result1 = new DateFmt({locale:"ur-PK", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3692 result2 = new DateFmt({locale:"ur-PK", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3693 test.equal(result1, 'EEEEØ d MMMMØ yyyy âh:mm a');3694 test.equal(result2, 'EØ d/M/yy âh:mm a');3695 result1 = new DateFmt({locale:"ur-PK", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3696 test.equal(result1, 'âh:mm:ss a z');3697 test.done();3698 },3699 testDateTimeFormat_zh_Hans_SG: function(test) {3700 test.expect(7);3701 var result1, result2, result3, result4;3702 result1 = new DateFmt({locale:"zh-Hans-SG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3703 result2 = new DateFmt({locale:"zh-Hans-SG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3704 result3 = new DateFmt({locale:"zh-Hans-SG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3705 result4 = new DateFmt({locale:"zh-Hans-SG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3706 test.equal(result1, "yyyyå¹´Mædæ¥EEEE");3707 test.equal(result2, "yyyyå¹´Mædæ¥EEE");3708 test.equal(result3, "yyyyå¹´Mædæ¥EE");3709 test.equal(result4, "dd/MM/yyE");3710 result1 = new DateFmt({locale:"zh-Hans-SG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3711 result2 = new DateFmt({locale:"zh-Hans-SG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3712 test.equal(result1, "yyyyå¹´Mædæ¥EEEE ah:mm");3713 test.equal(result2, "dd/MM/yyE ah:mm");3714 result1 = new DateFmt({locale:"zh-Hans-SG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3715 test.equal(result1, "z ah:mm:ss");3716 test.done();3717 },3718 testDateTimeFormat_zh_Hans_MY: function(test) {3719 test.expect(7);3720 var result1, result2, result3, result4;3721 result1 = new DateFmt({locale:"zh-Hans-MY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3722 result2 = new DateFmt({locale:"zh-Hans-MY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3723 result3 = new DateFmt({locale:"zh-Hans-MY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3724 result4 = new DateFmt({locale:"zh-Hans-MY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3725 test.equal(result1, "yyyyå¹´Mædæ¥EEEE");3726 test.equal(result2, "yyyyå¹´Mædæ¥EEE");3727 test.equal(result3, "yyyyå¹´Mædæ¥EE");3728 test.equal(result4, "yyyy/M/dE");3729 result1 = new DateFmt({locale:"zh-Hans-MY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3730 result2 = new DateFmt({locale:"zh-Hans-MY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3731 test.equal(result1, "yyyyå¹´Mædæ¥EEEE ah:mm");3732 test.equal(result2, "yyyy/M/dE ah:mm");3733 result1 = new DateFmt({locale:"zh-Hans-MY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3734 test.equal(result1, "z ah:mm:ss");3735 test.done();3736 },3737 testDateTimeFormat_ka_GE: function(test) {3738 test.expect(7);3739 var result1, result2, result3, result4;3740 result1 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3741 result2 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3742 result3 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3743 result4 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3744 test.equal(result1, "EEEE, dd MMMM, yyyy");3745 test.equal(result2, "EEE, d MMMM, yyyy");3746 test.equal(result3, "EE, d MMM. yyyy");3747 test.equal(result4, "E, dd.MM.yy");3748 result1 = new DateFmt({locale:"ka-GE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3749 result2 = new DateFmt({locale:"ka-GE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3750 test.equal(result1, "EEEE, dd MMMM, yyyy, HH:mm");3751 test.equal(result2, "E, dd.MM.yy, HH:mm");3752 result1 = new DateFmt({locale:"ka-GE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3753 test.equal(result1, "HH:mm:ss z");3754 test.done();3755 },3756 testDateTimeFormat_be_BY: function(test) {3757 test.expect(7);3758 var result1, result2, result3, result4;3759 result1 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3760 result2 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3761 result3 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3762 result4 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3763 test.equal(result1, "EEEE, d MMMM yyyy \'г\'.");3764 test.equal(result2, "EEE, d MMMM yyyy \'г\'.");3765 test.equal(result3, "EE, d MMM yyyy \'г\'.");3766 test.equal(result4, "E, d.MM.yy");3767 result1 = new DateFmt({locale:"be-BY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3768 result2 = new DateFmt({locale:"be-BY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3769 test.equal(result1, "EEEE, d MMMM yyyy \'г\'. \'Ñ\' HH:mm");3770 test.equal(result2, "E, d.MM.yy, HH:mm");3771 result1 = new DateFmt({locale:"be-BY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3772 test.equal(result1, "HH:mm:ss z");3773 test.done();3774 },3775 testDateTimeFormat_lo_LA: function(test) {3776 test.expect(7);3777 var result1, result2, result3, result4;3778 result1 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3779 result2 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3780 result3 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3781 result4 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3782 test.equal(result1, "EEEE àºàºµ d MMMM yyyy");3783 test.equal(result2, "EEE àºàºµ d MMMM yyyy");3784 test.equal(result3, "EE àºàºµ d MMM yyyy");3785 test.equal(result4, "E àºàºµ d/M/yyyy");3786 result1 = new DateFmt({locale:"lo-LA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3787 result2 = new DateFmt({locale:"lo-LA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3788 test.equal(result1, "EEEE àºàºµ d MMMM yyyy, H:mm");3789 test.equal(result2, "E àºàºµ d/M/yyyy, H:mm");3790 result1 = new DateFmt({locale:"lo-LA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3791 test.equal(result1, "H:mm:ss z");3792 test.done();3793 },3794 testDateTimeFormat_ky_KG: function(test) {3795 test.expect(7);3796 var result1, result2, result3, result4;3797 result1 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3798 result2 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3799 result3 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3800 result4 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3801 test.equal(result1, "yyyy-\'ж\'., d-MMMM, EEEE");3802 test.equal(result2, "yyyy-\'ж\'., d-MMMM, EEE");3803 test.equal(result3, "yyyy-\'ж\'., d-MMM, EE");3804 test.equal(result4, "d/M/yy, E");3805 result1 = new DateFmt({locale:"ky-KG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3806 result2 = new DateFmt({locale:"ky-KG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3807 test.equal(result1, "yyyy-\'ж\'., d-MMMM, EEEE HH:mm");3808 test.equal(result2, "d/M/yy, E HH:mm");3809 result1 = new DateFmt({locale:"ky-KG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3810 test.equal(result1, "HH:mm:ss z");3811 test.done();3812 },3813 testDateTimeFormat_ca_AD: function(test) {3814 test.expect(7);3815 var result1, result2, result3, result4;3816 result1 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3817 result2 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3818 result3 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3819 result4 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3820 test.equal(result1, "EEEE, d MMMM \'de\' yyyy");3821 test.equal(result2, "EEE, d MMMM \'de\' yyyy");3822 test.equal(result3, "EE, d MMM yyyy");3823 test.equal(result4, "E, d/M/yy");3824 result1 = new DateFmt({locale:"ca-AD", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3825 result2 = new DateFmt({locale:"ca-AD", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3826 test.equal(result1, "EEEE, d MMMM \'de\' yyyy, \'a\' \'les\' H:mm");3827 test.equal(result2, "E, d/M/yy H:mm");3828 result1 = new DateFmt({locale:"ca-AD", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3829 test.equal(result1, "H:mm:ss z");3830 test.done();3831 },3832 testDateTimeFormat_ca_ES: function(test) {3833 test.expect(7);3834 var result1, result2, result3, result4;3835 result1 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3836 result2 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3837 result3 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3838 result4 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3839 test.equal(result1, "EEEE, d MMMM \'de\' yyyy");3840 test.equal(result2, "EEE, d MMMM \'de\' yyyy");3841 test.equal(result3, "EE, d MMM yyyy");3842 test.equal(result4, "E, d/M/yy");3843 result1 = new DateFmt({locale:"ca-ES", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3844 result2 = new DateFmt({locale:"ca-ES", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3845 test.equal(result1, "EEEE, d MMMM \'de\' yyyy, \'a\' \'les\' H:mm");3846 test.equal(result2, "E, d/M/yy H:mm");3847 result1 = new DateFmt({locale:"ca-ES", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3848 test.equal(result1, "H:mm:ss z");3849 test.done();3850 },3851 testDateTimeFormat_hy_AM: function(test) {3852 test.expect(7);3853 var result1, result2, result3, result4;3854 result1 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3855 result2 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3856 result3 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3857 result4 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3858 test.equal(result1, "yyyy Õ©. MMMM d, EEEE");3859 test.equal(result2, "dd MMMM, yyyy Õ©., EEE");3860 test.equal(result3, "dd MMM, yyyy Õ©., EE");3861 test.equal(result4, "dd.MM.yy, E");3862 result1 = new DateFmt({locale:"hy-AM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3863 result2 = new DateFmt({locale:"hy-AM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3864 test.equal(result1, "yyyy Õ©. MMMM d, EEEE, HH:mm");3865 test.equal(result2, "dd.MM.yy, E, HH:mm");3866 result1 = new DateFmt({locale:"hy-AM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3867 test.equal(result1, "HH:mm:ss z");3868 test.done();3869 },3870 testDateTimeFormat_eu_ES: function(test) {3871 test.expect(7);3872 var result1, result2, result3, result4;3873 result1 = new DateFmt({locale:"eu-ES", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3874 result2 = new DateFmt({locale:"eu-ES", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3875 result3 = new DateFmt({locale:"eu-ES", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3876 result4 = new DateFmt({locale:"eu-ES", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3877 test.equal(result1, "yyyy(\'e\')\'ko\' MMMM\'ren\' d(\'a\'), EEEE");3878 test.equal(result2, "yyyy(\'e\')\'ko\' MMMM\'ren\' d(\'a\'), EEE");3879 test.equal(result3, "yyyy(\'e\')\'ko\' MMM d(\'a\'), EE");3880 test.equal(result4, "yy/M/d, E");3881 result1 = new DateFmt({locale:"eu-ES", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3882 result2 = new DateFmt({locale:"eu-ES", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3883 test.equal(result1, "yyyy(\'e\')\'ko\' MMMM\'ren\' d(\'a\'), EEEE HH:mm");3884 test.equal(result2, "yy/M/d, E HH:mm");3885 result1 = new DateFmt({locale:"eu-ES", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3886 test.equal(result1, "HH:mm:ss (z)");3887 test.done();3888 },3889 testDateTimeFormat_ne_NP: function(test) {3890 test.expect(7);3891 var result1, result2, result3, result4;3892 result1 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3893 result2 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3894 result3 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3895 result4 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3896 test.equal(result1, "yyyy MMMM d, EEEE");3897 test.equal(result2, "yyyy MMMM d, EEE");3898 test.equal(result3, "yyyy MMM d, EE");3899 test.equal(result4, "yy/M/d, E");3900 result1 = new DateFmt({locale:"ne-NP", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3901 result2 = new DateFmt({locale:"ne-NP", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3902 test.equal(result1, "yyyy MMMM d, EEEE HH:mm");3903 test.equal(result2, "yy/M/d, E, HH:mm");3904 result1 = new DateFmt({locale:"ne-NP", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3905 test.equal(result1, "HH:mm:ss z");3906 test.done();3907 },3908 testDateTimeFormat_my_MM: function(test) {3909 test.expect(7);3910 var result1, result2, result3, result4;3911 result1 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3912 result2 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3913 result3 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3914 result4 = new DateFmt({locale:"my-MM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3915 test.equal(result1, "yyyy- MMMM d- EEEE");3916 test.equal(result2, "yyyy- MMMM d- EEE");3917 test.equal(result3, "yyyy- MMM d- EE");3918 test.equal(result4, "dd-MM-yy- E");3919 result1 = new DateFmt({locale:"my-MM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3920 result2 = new DateFmt({locale:"my-MM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3921 test.equal(result1, "yyyy- MMMM d- EEEE H:mm");3922 test.equal(result2, "dd-MM-yy- E H:mm");3923 result1 = new DateFmt({locale:"my-MM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3924 test.equal(result1, "z H:mm:ss");3925 test.done();3926 },3927 testDateTimeFormat_wo_SN: function(test) {3928 test.expect(7);3929 var result1, result2, result3, result4;3930 result1 = new DateFmt({locale:"wo-SN", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3931 result2 = new DateFmt({locale:"wo-SN", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3932 result3 = new DateFmt({locale:"wo-SN", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3933 result4 = new DateFmt({locale:"wo-SN", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3934 test.equal(result1, "EEEE, d MMM, yyyy");3935 test.equal(result2, "EEE, d MMMM, yyyy");3936 test.equal(result3, "EE, d MMM, yyyy");3937 test.equal(result4, "E, dd-MM-yyyy");3938 result1 = new DateFmt({locale:"wo-SN", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3939 result2 = new DateFmt({locale:"wo-SN", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3940 test.equal(result1, "EEEE, d MMM, yyyy 'ci' HH:mm");3941 test.equal(result2, "E, dd-MM-yyyy - HH:mm");3942 result1 = new DateFmt({locale:"wo-SN", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3943 test.equal(result1, "HH:mm:ss z");3944 test.done();3945 },3946 testDateTimeFormat_tk_TM: function(test) {3947 test.expect(7);3948 var result1, result2, result3, result4;3949 result1 = new DateFmt({locale:"tk-TM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3950 result2 = new DateFmt({locale:"tk-TM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3951 result3 = new DateFmt({locale:"tk-TM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3952 result4 = new DateFmt({locale:"tk-TM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3953 test.equal(result1, "d MMMM yyyy EEEE");3954 test.equal(result2, "d MMMM yyyy EEE");3955 test.equal(result3, "d MMM yyyy EE");3956 test.equal(result4, "dd.MM.yyyy E");3957 result1 = new DateFmt({locale:"tk-TM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3958 result2 = new DateFmt({locale:"tk-TM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3959 test.equal(result1, "d MMMM yyyy EEEE HH:mm");3960 test.equal(result2, "dd.MM.yyyy E HH:mm");3961 result1 = new DateFmt({locale:"tk-TM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3962 test.equal(result1, "HH:mm:ss z");3963 test.done();3964 },3965 testDateTimeFormat_tg_TJ: function(test) {3966 test.expect(7);3967 var result1, result2, result3, result4;3968 result1 = new DateFmt({locale:"tg-TJ", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3969 result2 = new DateFmt({locale:"tg-TJ", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3970 result3 = new DateFmt({locale:"tg-TJ", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3971 result4 = new DateFmt({locale:"tg-TJ", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3972 test.equal(result1, "EEEE, dd MMMM yyyy");3973 test.equal(result2, "EEE, dd MMMM yyyy");3974 test.equal(result3, "EE, dd MMM yyyy");3975 test.equal(result4, "E, dd/MM/yy");3976 result1 = new DateFmt({locale:"tg-TJ", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3977 result2 = new DateFmt({locale:"tg-TJ", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3978 test.equal(result1, "EEEE, dd MMMM yyyy HH:mm");3979 test.equal(result2, "E, dd/MM/yy HH:mm");3980 result1 = new DateFmt({locale:"tg-TJ", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;3981 test.equal(result1, "HH:mm:ss z");3982 test.done();3983 },3984 testDateTimeFormat_mt_MT: function(test) {3985 test.expect(7);3986 var result1, result2, result3, result4;3987 result1 = new DateFmt({locale:"mt-MT", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3988 result2 = new DateFmt({locale:"mt-MT", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;3989 result3 = new DateFmt({locale:"mt-MT", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;3990 result4 = new DateFmt({locale:"mt-MT", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3991 test.equal(result1, "EEEE, d 'ta'â MMMM yyyy");3992 test.equal(result2, "EEE, d 'ta'â MMMM yyyy");3993 test.equal(result3, "EE, dd MMM yyyy");3994 test.equal(result4, "E, dd/MM/yyyy");3995 result1 = new DateFmt({locale:"mt-MT", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;3996 result2 = new DateFmt({locale:"mt-MT", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;3997 test.equal(result1, "EEEE, d 'ta'â MMMM yyyy HH:mm");3998 test.equal(result2, "E, dd/MM/yyyy HH:mm");3999 result1 = new DateFmt({locale:"mt-MT", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;4000 test.equal(result1, "HH:mm:ss z");4001 test.done();4002 },4003 testDateTimeFormat_zu_ZA: function(test) {4004 test.expect(7);4005 var result1, result2, result3, result4;4006 result1 = new DateFmt({locale:"zu-ZA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;4007 result2 = new DateFmt({locale:"zu-ZA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;4008 result3 = new DateFmt({locale:"zu-ZA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;4009 result4 = new DateFmt({locale:"zu-ZA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;4010 test.equal(result1, "EEEE, MMMM d, yyyy");4011 test.equal(result2, "EEE, MMMM d, yyyy");4012 test.equal(result3, "EE, MMM d, yyyy");4013 test.equal(result4, "E, M/d/yy");4014 result1 = new DateFmt({locale:"zu-ZA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;4015 result2 = new DateFmt({locale:"zu-ZA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;4016 test.equal(result1, "EEEE, MMMM d, yyyy HH:mm");4017 test.equal(result2, "E, M/d/yy HH:mm");4018 result1 = new DateFmt({locale:"zu-ZA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;4019 test.equal(result1, "HH:mm:ss z");4020 test.done();4021 },4022 testDateTimeFormat_lb_LU: function(test) {4023 test.expect(7);4024 var result1, result2, result3, result4;4025 result1 = new DateFmt({locale:"lb-LU", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;4026 result2 = new DateFmt({locale:"lb-LU", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;4027 result3 = new DateFmt({locale:"lb-LU", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;4028 result4 = new DateFmt({locale:"lb-LU", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;4029 test.equal(result1, "EEEE, d. MMMM yyyy");4030 test.equal(result2, "EEE, d. MMMM yyyy");4031 test.equal(result3, "EE, d. MMM yyyy");4032 test.equal(result4, "E, dd.MM.yy");4033 result1 = new DateFmt({locale:"lb-LU", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;4034 result2 = new DateFmt({locale:"lb-LU", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;4035 test.equal(result1, "EEEE, d. MMMM yyyy HH:mm");4036 test.equal(result2, "E, dd.MM.yy HH:mm");4037 result1 = new DateFmt({locale:"lb-LUG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;4038 test.equal(result1, "HH:mm:ss z");4039 test.done();4040 }...
scrollable.api.tests.js
Source:scrollable.api.tests.js
1import $ from 'jquery';2import { getTranslateValues } from 'renovation/ui/scroll_view/utils/get_translate_values';3import resizeCallbacks from 'core/utils/resize_callbacks';4import animationFrame from 'animation/frame';5import config from 'core/config';6import browser from 'core/utils/browser';7import pointerMock from '../../../helpers/pointerMock.js';8import { isRenderer } from 'core/utils/type';9import 'generic_light.css!';10import {11 SCROLLABLE_CONTAINER_CLASS,12 SCROLLABLE_CONTENT_CLASS,13 SCROLLABLE_SCROLLBAR_CLASS,14 SCROLLABLE_SCROLL_CLASS,15 SCROLLBAR_HORIZONTAL_CLASS,16 SCROLLBAR_VERTICAL_CLASS,17 SCROLLABLE_SCROLLBARS_HIDDEN,18 SCROLLABLE_DISABLED_CLASS,19 calculateInertiaDistance20} from './scrollable.constants.js';21const moduleConfig = {22 beforeEach: function() {23 const markup = '\24 <div id="scrollable" style="height: 50px; width: 50px;">\25 <div class="content1" style="height: 100px; width: 100px;"></div>\26 <div class="content2"></div>\27 </div>';28 $('#qunit-fixture').html(markup);29 this.clock = sinon.useFakeTimers();30 this._originalRequestAnimationFrame = animationFrame.requestAnimationFrame;31 animationFrame.requestAnimationFrame = function(callback) {32 callback();33 };34 },35 afterEach: function() {36 this.clock.restore();37 animationFrame.requestAnimationFrame = this._originalRequestAnimationFrame;38 }39};40const getScrollOffset = function($scrollable) {41 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);42 const $container = $scrollable.find('.' + SCROLLABLE_CONTAINER_CLASS);43 const location = getTranslateValues($content.get(0));44 return {45 top: location.top - $container.scrollTop(),46 left: location.left - $container.scrollLeft()47 };48};49QUnit.module('api', moduleConfig);50QUnit.test('update', function(assert) {51 const moveDistance = -10;52 const moveDuration = 10;53 const inertiaDistance = calculateInertiaDistance(moveDistance, moveDuration);54 const distance = moveDistance + inertiaDistance;55 const $scrollable = $('#scrollable');56 const $scrollableChild = $scrollable.find('div');57 $scrollableChild.height(0);58 $scrollable.dxScrollable({59 useNative: false,60 onEnd: function() {61 const location = getScrollOffset($scrollable);62 assert.equal(Math.round(location.top), Math.round(distance), 'distance was calculated correctly');63 }64 });65 const mouse = pointerMock($scrollable.find('.' + SCROLLABLE_CONTENT_CLASS)).start();66 $scrollableChild.height(-1 * distance + 1);67 $scrollable.dxScrollable('instance').update();68 mouse69 .down()70 .wait(moveDuration)71 .move(0, moveDistance)72 .up();73});74QUnit.test('scroll event should be triggered if scroll position changed', function(assert) {75 let called = 0;76 const $scrollable = $('#scrollable').dxScrollable({77 useNative: false,78 direction: 'both'79 });80 const $content = $scrollable.find('.content1');81 $scrollable.dxScrollable('scrollTo', { top: 50, left: 50 });82 return new Promise(function(resolve) {83 $scrollable.dxScrollable('option', 'onScroll', function() {84 assert.ok(++called <= 2, 'scroll was fired on height change');85 resolve();86 });87 $content.height(50);88 }).then(function() {89 return new Promise(function(resolve) {90 $scrollable.dxScrollable('option', 'onScroll', function() {91 assert.ok(++called >= 2, 'scroll was fired on width change');92 resolve();93 });94 $content.width(50);95 });96 });97});98QUnit.test('content', function(assert) {99 const $scrollable = $('#scrollable').dxScrollable({100 useNative: false101 });102 const content = $scrollable.dxScrollable('instance').content();103 assert.equal(isRenderer(content), !!config().useJQuery, 'content is correct');104 assert.ok($(content).hasClass(SCROLLABLE_CONTENT_CLASS), 'returns content');105});106QUnit.test('scrollBy with plain object', function(assert) {107 const distance = 10;108 const $scrollable = $('#scrollable').dxScrollable({109 useNative: false,110 onEnd: function() {111 const location = getScrollOffset($scrollable);112 assert.equal(location.top, -distance, 'scroll to correctly vertical position');113 assert.equal(location.left, 0, 'scroll to correctly horizontal position');114 }115 });116 const scrollable = $scrollable.dxScrollable('instance');117 scrollable.scrollBy({ left: distance, top: distance });118});119QUnit.test('scrollBy with numeric', function(assert) {120 const distance = 10;121 const $scrollable = $('#scrollable').dxScrollable({122 useNative: false,123 onEnd: function() {124 const location = getScrollOffset($scrollable);125 assert.equal(location.top, -distance, 'scroll to correctly vertical position');126 assert.equal(location.left, 0, 'scroll to correctly horizontal position');127 }128 });129 const scrollable = $scrollable.dxScrollable('instance');130 scrollable.scrollBy(distance);131});132QUnit.test('scrollBy actions', function(assert) {133 let started = 0;134 let scrolled = 0;135 let ended = 0;136 const completed = $.Deferred();137 const distance = 10;138 const $scrollable = $('#scrollable').dxScrollable({139 useNative: false,140 onStart: function() {141 started++;142 },143 onScroll: function() {144 scrolled++;145 },146 onEnd: function() {147 ended++;148 completed.resolve();149 }150 });151 const scrollable = $scrollable.dxScrollable('instance');152 scrollable.scrollBy(distance);153 completed.done(function() {154 assert.equal(started, 1, 'start action should be fired once');155 assert.equal(scrolled, 1, 'scroll action should be fired once');156 assert.equal(ended, 1, 'end action should be fired once');157 });158});159QUnit.test('scrollBy to location', function(assert) {160 const distance = 10;161 let wasFirstMove = false;162 const $scrollable = $('#scrollable').dxScrollable({163 useNative: false,164 onEnd: function() {165 if(wasFirstMove) {166 const location = getScrollOffset($scrollable);167 assert.equal(location.top, -distance * 2, 'scroll to correctly vertical position');168 }169 wasFirstMove = true;170 }171 });172 const scrollable = $scrollable.dxScrollable('instance');173 scrollable.scrollBy(distance);174 scrollable.scrollBy(distance);175});176QUnit.test('scrollBy to location with dynamic content', function(assert) {177 const distance = 10;178 let wasFirstMove = false;179 const $scrollable = $('#scrollable').empty().dxScrollable({180 useNative: false,181 onEnd: function() {182 if(wasFirstMove) {183 const location = getScrollOffset($scrollable);184 assert.equal(location.top, -distance * 2, 'scroll to correctly vertical position');185 }186 wasFirstMove = true;187 }188 });189 const scrollable = $scrollable.dxScrollable('instance');190 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);191 $content.append($('<div>').height(100));192 scrollable.scrollBy(distance);193 scrollable.scrollBy(distance);194});195QUnit.test('scrollBy to location with dynamic content if auto update is prevented', function(assert) {196 const distance = 10;197 let wasFirstMove = false;198 const $scrollable = $('#scrollable').empty().dxScrollable({199 useNative: false,200 updateManually: true,201 onEnd: function() {202 if(wasFirstMove) {203 const location = getScrollOffset($scrollable);204 assert.equal(location.top, 0, 'scroll to correctly vertical position');205 }206 wasFirstMove = true;207 }208 });209 const scrollable = $scrollable.dxScrollable('instance');210 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);211 $content.append($('<div>').height(100));212 scrollable.scrollBy(distance);213 scrollable.scrollBy(distance);214});215QUnit.test('scrollTo to location', function(assert) {216 const distance = 10;217 let actionFiredCount = 0;218 const $scrollable = $('#scrollable').dxScrollable({219 useNative: false,220 onEnd: function() {221 actionFiredCount++;222 }223 });224 const scrollable = $scrollable.dxScrollable('instance');225 scrollable.scrollTo(distance);226 scrollable.scrollTo(distance);227 assert.equal(actionFiredCount, 1, 'action was fired only one time');228});229QUnit.test('scrollTo to location with dynamic content', function(assert) {230 let wasFirstMove = false;231 const $scrollable = $('#scrollable').empty().append($('<div>').height(150)).dxScrollable({232 useNative: false,233 onEnd: function() {234 if(wasFirstMove) {235 const location = getScrollOffset($scrollable);236 assert.roughEqual(location.top, -50, 1.01, 'scroll to correctly vertical position');237 }238 wasFirstMove = true;239 }240 });241 const scrollable = $scrollable.dxScrollable('instance');242 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);243 scrollable.scrollTo(100);244 $content.empty().append($('<div>').height(101));245 scrollable.scrollTo(50);246});247QUnit.test('scrollOffset', function(assert) {248 const $scrollable = $('#scrollable').dxScrollable({249 useNative: false250 });251 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);252 pointerMock($content)253 .start()254 .down()255 .move(0, -10);256 assert.deepEqual($scrollable.dxScrollable('scrollOffset'), { top: 10, left: 0 }, 'scrollOffset is correct');257});258QUnit.test('scrollLeft', function(assert) {259 const $scrollable = $('#scrollable').dxScrollable({260 useNative: false,261 direction: 'horizontal'262 });263 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);264 pointerMock($content)265 .start()266 .down()267 .move(-10, 0);268 assert.equal($scrollable.dxScrollable('scrollLeft'), 10, 'scrollLeft is correct');269});270QUnit.test('scrollTop', function(assert) {271 const $scrollable = $('#scrollable').dxScrollable({272 useNative: false273 });274 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);275 pointerMock($content)276 .start()277 .down()278 .move(0, -10);279 assert.equal($scrollable.dxScrollable('scrollTop'), 10, 'scrollTop is correct');280});281QUnit.test('scrollbar hidden while scrolling when showScrollbar is false', function(assert) {282 const $scrollable = $('#scrollable').dxScrollable({283 useNative: false,284 showScrollbar: false285 });286 const $scrollbar = $scrollable.find('.' + SCROLLABLE_SCROLL_CLASS);287 pointerMock($scrollable.find('.' + SCROLLABLE_CONTENT_CLASS))288 .start()289 .down()290 .move(0, -1);291 assert.equal($scrollbar.is(':hidden'), true, 'scrollbar is hidden');292});293QUnit.test('showScrollbar: never -> onScroll, useNative: true, useSimulatedScrollbar: true, should add dx-scrollable-scrollbars-hidden class', function(assert) {294 const $scrollable = $('#scrollable').dxScrollable({295 useNative: true,296 showScrollbar: false,297 useSimulatedScrollbar: true,298 });299 assert.equal($scrollable.hasClass(SCROLLABLE_SCROLLBARS_HIDDEN), true);300 $scrollable.dxScrollable('option', 'showScrollbar', true);301 assert.equal($scrollable.hasClass(SCROLLABLE_SCROLLBARS_HIDDEN), false);302});303QUnit.test('showScrollbar: never -> onScroll, useNative: false, should not add dx-scrollable-scrollbars-hidden class', function(assert) {304 const $scrollable = $('#scrollable').dxScrollable({305 useNative: false,306 showScrollbar: false307 });308 assert.equal($scrollable.hasClass(SCROLLABLE_SCROLLBARS_HIDDEN), false);309 $scrollable.dxScrollable('option', 'showScrollbar', true);310 assert.equal($scrollable.hasClass(SCROLLABLE_SCROLLBARS_HIDDEN), false);311});312QUnit.test('event arguments', function(assert) {313 const $scrollable = $('#scrollable').dxScrollable({314 useNative: false,315 inertiaEnabled: false,316 onScroll: function(e) {317 assert.notEqual(e.event, undefined, 'Event passed');318 assert.deepEqual(e.scrollOffset, { top: 10, left: undefined }, 'scrollOffset passed');319 assert.equal(e.reachedLeft, undefined, 'reachedLeft passed');320 assert.equal(e.reachedRight, undefined, 'reachedRight passed');321 assert.equal(e.reachedTop, false, 'reachedTop passed');322 assert.equal(e.reachedBottom, false, 'reachedBottom passed');323 }324 });325 const mouse = pointerMock($scrollable.find('.' + SCROLLABLE_CONTENT_CLASS)).start();326 const distance = -10;327 mouse328 .down()329 .move(0, distance)330 .up();331});332QUnit.test('disabled: scroll was not moved when disabled is true', function(assert) {333 const $scrollable = $('#scrollable').dxScrollable({334 useNative: false,335 disabled: true336 });337 const mouse = pointerMock($scrollable.find('.' + SCROLLABLE_CONTENT_CLASS)).start();338 const distance = -10;339 mouse.down().move(0, distance);340 const location = getScrollOffset($scrollable);341 assert.equal(location.top, 0, 'scroll was not moved when disabled is true');342 mouse.up();343});344QUnit.test('simulated strategy should subscribe to the poiner events after disabled option changed', function(assert) {345 const $scrollable = $('#scrollable');346 const scrollableInstance = $('#scrollable').dxScrollable({347 useNative: false,348 showScrollbar: 'onHover',349 disabled: true350 }).dxScrollable('instance');351 scrollableInstance.option('disabled', false);352 const $scroll = $scrollable.find(`.${SCROLLABLE_SCROLLBAR_CLASS} .dx-scrollable-scroll`);353 const $container = $scrollable.find('.' + SCROLLABLE_CONTAINER_CLASS);354 $container.trigger('mouseenter');355 assert.equal($scroll.hasClass('dx-state-invisible'), false, 'thumb is visible after mouse enter');356});357QUnit.test('disabled option add class to root element', function(assert) {358 const $scrollable = $('#scrollable').dxScrollable({359 useNative: false360 });361 assert.equal($scrollable.hasClass(SCROLLABLE_DISABLED_CLASS), false, 'scrollable have not disabled class');362 $scrollable.dxScrollable('option', 'disabled', true);363 assert.equal($scrollable.hasClass(SCROLLABLE_DISABLED_CLASS), true, 'scrollable have disabled class');364});365QUnit.test('changing option showScrollbar does not duplicate scrollbar', function(assert) {366 const $scrollable = $('#scrollable').dxScrollable({367 useNative: false,368 showScrollbar: true369 });370 $scrollable.dxScrollable('option', 'showScrollbar', false);371 const $scrollbars = $scrollable.find('.' + SCROLLABLE_SCROLLBAR_CLASS);372 assert.equal($scrollbars.length, 1, 'scrollbar is not duplicated');373});374QUnit.test('switching useNative to false turns off native scrolling', function(assert) {375 const $scrollable = $('#scrollable').dxScrollable({376 useNative: true377 });378 const $container = $scrollable.find('.' + SCROLLABLE_CONTAINER_CLASS);379 assert.notEqual($container.css('overflowY'), 'hidden');380 $scrollable.dxScrollable('option', 'useNative', false);381 assert.equal($container.css('overflowY'), 'hidden');382});383QUnit.test('scrollToElement', function(assert) {384 const $scrollable = $('#scrollable').height(50);385 const $wrapper = $scrollable.wrapInner('<div>').children().eq(0);386 const $item = $('<div>').height(25).appendTo($scrollable);387 $scrollable.dxScrollable({388 direction: 'vertical'389 });390 const scrollable = $scrollable.dxScrollable('instance');391 scrollable.scrollToElement($item.get(0));392 assert.roughEqual(scrollable.scrollTop(), $wrapper.height() + $item.outerHeight() - scrollable.clientHeight(), 0.5);393});394QUnit.test('getScrollElementPosition', function(assert) {395 const $scrollable = $('#scrollable').height(50);396 const $item = $('<div>').height(25).appendTo($scrollable);397 $scrollable.dxScrollable({398 direction: 'vertical'399 });400 const scrollable = $scrollable.dxScrollable('instance');401 const position = scrollable.getScrollElementPosition($item, 'vertical');402 assert.equal(position, $item.offset().top - $scrollable.offset().top - $item.height());403});404QUnit.test('scrollToElement when item height is greater than scroll height', function(assert) {405 const $scrollable = $('#scrollable').height(50);406 const $wrapper = $scrollable.wrapInner('<div>').children().eq(0);407 const $item = $('<div>').height(100).appendTo($scrollable);408 $scrollable.dxScrollable({409 direction: 'vertical'410 });411 const scrollable = $scrollable.dxScrollable('instance');412 scrollable.scrollToElement($item.get(0));413 assert.equal(scrollable.scrollTop(), $wrapper.height());414});415QUnit.test('scrollToElement with offset', function(assert) {416 const bottomOffset = 70;417 const $scrollable = $('#scrollable').empty().height(100);418 const $item1 = $('<div>').height(50).appendTo($scrollable);419 const $item2 = $('<div>').height(50).appendTo($scrollable);420 $('<div>').height(150).appendTo($scrollable);421 const scrollable = $scrollable.dxScrollable({422 direction: 'vertical'423 }).dxScrollable('instance');424 scrollable.scrollToElement($item2, { bottom: bottomOffset });425 assert.equal(scrollable.scrollTop(), $item1.outerHeight());426});427QUnit.test('scrollToElement with offset in opposite direction', function(assert) {428 const topOffset = 30;429 const $scrollable = $('#scrollable').empty().height(100);430 const $item1 = $('<div>').height(50).appendTo($scrollable);431 const $item2 = $('<div>').height(50).appendTo($scrollable);432 $('<div>').height(1500).appendTo($scrollable);433 const scrollable = $scrollable.dxScrollable({434 direction: 'vertical'435 }).dxScrollable('instance');436 scrollable.scrollTo(200);437 scrollable.scrollToElement($item2, { top: topOffset });438 assert.equal(scrollable.scrollTop(), $item1.outerHeight() - topOffset);439});440QUnit.test('scrollToElement with absolute position in the container(T162489)', function(assert) {441 const $scrollable = $('#scrollable');442 const $wrapper = $scrollable.wrapInner('<div>').children().eq(0);443 const $item = $('<div>', {444 css: {445 position: 'absolute',446 top: 50447 }448 }).height(100).append($('<div/>')).appendTo($scrollable);449 $scrollable.dxScrollable({450 direction: 'vertical'451 });452 const scrollable = $scrollable.dxScrollable('instance');453 scrollable.scrollTo(50);454 scrollable.scrollToElement($item.children().eq(0));455 assert.equal(scrollable.scrollTop(), $wrapper.height() - scrollable.clientHeight());456});457QUnit.test('scrollToElement does not scroll to element when element is not child of scrollable', function(assert) {458 const $scrollable = $('#scrollable');459 const $item = $('<div>').height(500).insertAfter($scrollable);460 $scrollable.dxScrollable({461 direction: 'vertical'462 });463 const scrollable = $scrollable.dxScrollable('instance');464 scrollable.scrollToElement($item);465 assert.equal(scrollable.scrollTop(), 0, 'scrollable was not scrolled');466});467QUnit.test('scrollToElement scrolls to bottom position of element when scroll scrollTop less than element position.top', function(assert) {468 const $scrollable = $('#scrollable').height(50);469 const $wrapper = $scrollable.wrapInner('<div>').children().eq(0);470 const $item = $('<div>').height(100).appendTo($scrollable);471 const $spaceItem = $('<div>').height(500).appendTo($scrollable);472 $scrollable.dxScrollable({473 direction: 'vertical'474 });475 const scrollable = $scrollable.dxScrollable('instance');476 scrollable.scrollTo($wrapper.height() + $item.height() + $spaceItem.height());477 scrollable.scrollToElement($item);478 assert.equal(scrollable.scrollTop(), $wrapper.outerHeight() + $item.outerHeight() - scrollable.clientHeight());479});480QUnit.test('scrollToElement does not scroll when element is placed in visible area', function(assert) {481 const $scrollable = $('#scrollable').height(30);482 const $item = $('<div>').height(10).prependTo($scrollable);483 $('<div>').height(30).prependTo($scrollable);484 $scrollable.dxScrollable({485 direction: 'vertical'486 });487 const scrollable = $scrollable.dxScrollable('instance');488 scrollable.scrollTo(30);489 scrollable.scrollToElement($item);490 assert.equal(scrollable.scrollTop(), 30);491});492QUnit.test('scrollToElement does not scroll when element is placed in visible area and greater than visible area', function(assert) {493 const $scrollable = $('#scrollable').height(30);494 const $item = $('<div>').height(50).prependTo($scrollable);495 $scrollable.dxScrollable({496 direction: 'vertical'497 });498 const scrollable = $scrollable.dxScrollable('instance');499 scrollable.scrollToElement($item);500 assert.equal(scrollable.scrollTop(), 0);501});502QUnit.test('scrollToElement scrolls in both directions', function(assert) {503 const topPosition = 30;504 const leftPosition = 50;505 const itemSize = 30;506 const $scrollable = $('#scrollable').width(50).height(50).css('position', 'relative');507 $scrollable.wrapInner('<div>').children().eq(0).width(200).height(200);508 const $item = $('<div>').css({509 width: itemSize + 'px',510 height: itemSize + 'px',511 position: 'absolute',512 top: topPosition + 'px',513 left: leftPosition + 'px'514 }).appendTo($scrollable);515 const scrollable = $scrollable.dxScrollable({516 direction: 'both'517 }).dxScrollable('instance');518 scrollable.scrollToElement($item);519 assert.roughEqual(scrollable.scrollTop(), topPosition + itemSize - scrollable.clientHeight(), 1, 'scrollable was scrolled by vertical');520 assert.roughEqual(scrollable.scrollLeft(), leftPosition + itemSize - scrollable.clientWidth(), 1, 'scrollable was scrolled by horizontal');521});522QUnit.test('scrollTo should not reset unused position', function(assert) {523 const contentWidth = 1000;524 const containerWidth = 100;525 const $scrollable = $('#scrollable').width(containerWidth);526 $scrollable.wrapInner('<div>').children().width(contentWidth);527 const scrollable = $scrollable.dxScrollable({528 useNative: false,529 inertiaEnabled: false,530 direction: 'both'531 }).dxScrollable('instance');532 scrollable.scrollTo({ left: containerWidth, top: 10 });533 scrollable.scrollTo({ top: 40 });534 assert.equal(scrollable.scrollLeft(), containerWidth, 'left position was not reset');535 assert.equal(scrollable.scrollTop(), 40, 'top position set');536});537class ScrollableTestHelper {538 constructor(options) {539 const { useNative, direction, useSimulatedScrollbar, rtlEnabled } = options;540 this.onScrollHandler = sinon.spy();541 this._useNative = useNative;542 this._direction = direction;543 this._rtlEnabled = rtlEnabled;544 this._useSimulatedScrollbar = useSimulatedScrollbar;545 this.$scrollable = $('#scrollable');546 this.scrollable = this._getScrollable();547 this.$container = this._getScrollableContainer();548 }549 _getScrollable() {550 return this.$scrollable.dxScrollable({551 useNative: this._useNative,552 useSimulatedScrollbar: this._useSimulatedScrollbar,553 direction: this._direction,554 rtlEnabled: this._rtlEnabled,555 showScrollbar: 'always',556 onScroll: this.onScrollHandler557 }).dxScrollable('instance');558 }559 getMaxScrollOffset() {560 const containerElement = this.$container.get(0);561 const maxVerticalOffset = containerElement.scrollHeight - containerElement.clientHeight;562 const maxHorizontalOffset = containerElement.scrollWidth - containerElement.clientWidth;563 return {564 vertical: this._useNative ? maxVerticalOffset : maxVerticalOffset,565 horizontal: maxHorizontalOffset566 };567 }568 _getScrollableContainer() {569 return this.$scrollable.find(`.${SCROLLABLE_CONTAINER_CLASS}`);570 }571 getScrollbarSize(prop) {572 return this.$container.get(0)[`offset${prop}`] - this.$container.get(0)[`client${prop}`];573 }574 checkScrollEvent(options) {575 const scrollArguments = this.onScrollHandler.lastCall.args[0];576 QUnit.assert.equal(scrollArguments.reachedTop, options.reachedTop, 'reachedTop');577 QUnit.assert.equal(scrollArguments.reachedBottom, options.reachedBottom, 'reachedBottom');578 QUnit.assert.equal(scrollArguments.reachedLeft, options.reachedLeft, 'reachedLeft');579 QUnit.assert.equal(scrollArguments.reachedRight, options.reachedRight, 'reachedRight');580 }581 checkScrollTranslateValues({ vertical, horizontal }) {582 if(!this._useNative || (this._useNative && this._useSimulatedScrollbar)) {583 const checkTranslateValues = ({ vertical, horizontal }) => {584 if(this._direction === 'vertical' || this._direction === 'both') {585 const $scroll = this.$scrollable.find(`.${SCROLLBAR_VERTICAL_CLASS} .${SCROLLABLE_SCROLL_CLASS}`);586 const { left, top } = getTranslateValues($scroll.get(0));587 QUnit.assert.strictEqual(left, 0, 'translate left');588 QUnit.assert.roughEqual(top, vertical, 1.001, 'translate top');589 }590 if(this._direction === 'horizontal' || this._direction === 'both') {591 const $scroll = this.$scrollable.find(`.${SCROLLBAR_HORIZONTAL_CLASS} .${SCROLLABLE_SCROLL_CLASS}`);592 const { left, top } = getTranslateValues($scroll.get(0));593 QUnit.assert.roughEqual(left, horizontal, 1.001, 'translate left');594 QUnit.assert.strictEqual(top, 0, 'translate top');595 }596 };597 if(this._useNative && this._useSimulatedScrollbar) {598 this.scrollable.update();599 this._getScrollableContainer().trigger('scroll');600 }601 checkTranslateValues({ vertical, horizontal });602 }603 }604 checkScrollOffset({ left, top, maxScrollOffset, epsilon = 0.001 }, message) {605 const scrollOffset = getScrollOffset(this.$scrollable);606 QUnit.assert.roughEqual(this.getMaxScrollOffset().horizontal, maxScrollOffset, epsilon, 'horizontal maxScrollOffset');607 QUnit.assert.roughEqual(-scrollOffset.left, left, epsilon, 'scrollOffset.left');608 QUnit.assert.roughEqual(-scrollOffset.top, top, epsilon, 'scrollOffset.top');609 QUnit.assert.roughEqual(this.scrollable.scrollLeft(), left, epsilon, message || 'scrollable.scrollLeft()');610 QUnit.assert.roughEqual(this.scrollable.scrollTop(), top, epsilon, 'scrollable.scrollTop()');611 }612 setContainerWidth(width) {613 this.$scrollable.css('width', width);614 resizeCallbacks.fire();615 }616}617[true, false].forEach((useNative) => {618 [true, false].forEach((useSimulatedScrollbar) => {619 // T947463620 QUnit.module(`ScrollToElement, native: ${useNative}, useSimulateScrollbar: ${useSimulatedScrollbar}`, moduleConfig, () => {621 const elementHeight = 20;622 const elementWidth = 30;623 const elementOffset = { top: 100, left: 100 };624 const setInitialState = () => {625 $('.content1').css({ width: 0, height: 0 });626 $('.content2').css({ width: 200, height: 200, position: 'relative' });627 $('<div id="element"></div>').css({ position: 'absolute', width: elementWidth, height: elementHeight }).appendTo($('.content2'));628 };629 ['vertical', 'horizontal', 'both'].forEach((direction) => {630 QUnit.test(`Scroll from top to bottom, direction: ${direction}, rtlEnabled: false`, function() {631 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });632 setInitialState();633 const $element = $('#element').css({ top: elementOffset.top });634 helper.scrollable.scrollToElement($element);635 helper.scrollable.update();636 const expectedTopOffset = direction !== 'horizontal' ? helper.$container.get(0).offsetHeight + elementHeight + helper.getScrollbarSize('Height') : 0;637 helper.checkScrollOffset({ left: 0, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });638 helper.checkScrollTranslateValues({ vertical: 16, horizontal: 0 });639 });640 QUnit.test(`Scroll from left to right, direction: ${direction}, rtlEnabled: false`, function() {641 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });642 setInitialState();643 const $element = $('#element').css({ left: elementOffset.left });644 helper.scrollable.scrollToElement($element);645 helper.scrollable.update();646 const expectedLeftOffset = direction !== 'vertical' ? helper.$container.get(0).offsetWidth + elementWidth + helper.getScrollbarSize('Width') : 0;647 helper.checkScrollOffset({ left: expectedLeftOffset, top: 0, maxScrollOffset: helper.getMaxScrollOffset().horizontal });648 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 18 });649 });650 QUnit.test(`Scroll from bottom to top, direction: ${direction}, rtlEnabled: false`, function() {651 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });652 setInitialState();653 const $element = $('#element').css({ top: elementOffset.top });654 helper.scrollable.scrollTo({ top: helper.getMaxScrollOffset().vertical });655 helper.scrollable.update();656 helper.scrollable.scrollToElement($element);657 helper.scrollable.update();658 const expectedTopOffset = direction !== 'horizontal' ? elementOffset.top : 0;659 helper.checkScrollOffset({ left: 0, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });660 helper.checkScrollTranslateValues({ vertical: 23, horizontal: 0 });661 });662 QUnit.test(`Scroll from right to left, direction: ${direction}, rtlEnabled: false`, function() {663 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });664 setInitialState();665 const $element = $('#element').css({ left: elementOffset.left });666 helper.scrollable.scrollTo({ left: helper.getMaxScrollOffset().horizontal });667 helper.scrollable.update();668 helper.scrollable.scrollToElement($element);669 helper.scrollable.update();670 const expectedLeftOffset = direction !== 'vertical' ? elementOffset.left : 0;671 helper.checkScrollOffset({ left: expectedLeftOffset, top: 0, maxScrollOffset: helper.getMaxScrollOffset().horizontal });672 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 23 });673 });674 QUnit.test(`Scroll from left-top to right-bottom, direction: ${direction}, rtlEnabled: false`, function() {675 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });676 setInitialState();677 const $element = $('#element').css({ top: elementOffset.top, left: elementOffset.left });678 helper.scrollable.scrollToElement($element);679 helper.scrollable.update();680 const expectedTopOffset = direction !== 'horizontal' ? helper.$container.get(0).offsetHeight + elementHeight + helper.getScrollbarSize('Height') : 0;681 const expectedLeftOffset = direction !== 'vertical' ? helper.$container.get(0).offsetWidth + elementWidth + helper.getScrollbarSize('Width') : 0;682 helper.checkScrollOffset({ left: expectedLeftOffset, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });683 helper.checkScrollTranslateValues({ vertical: 16, horizontal: 18 });684 });685 QUnit.test(`Scroll from left-bottom to right-top, direction: ${direction}, rtlEnabled: false`, function() {686 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });687 setInitialState();688 const $element = $('#element').css({ top: elementOffset.top, left: elementOffset.left });689 helper.scrollable.scrollTo({ top: helper.getMaxScrollOffset().vertical });690 helper.scrollable.update();691 helper.scrollable.scrollToElement($element);692 helper.scrollable.update();693 const expectedTopOffset = direction !== 'horizontal' ? elementOffset.top : 0;694 const expectedLeftOffset = direction !== 'vertical' ? helper.$container.get(0).offsetWidth + elementWidth + helper.getScrollbarSize('Width') : 0;695 helper.checkScrollOffset({ left: expectedLeftOffset, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });696 helper.checkScrollTranslateValues({ vertical: 23, horizontal: 18 });697 });698 QUnit.test(`Scroll from right-bottom to left-top, direction: ${direction}, rtlEnabled: false`, function() {699 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });700 setInitialState();701 const $element = $('#element').css({ top: elementOffset.top, left: elementOffset.left });702 helper.scrollable.scrollTo({ top: helper.getMaxScrollOffset().vertical, left: helper.getMaxScrollOffset().horizontal });703 helper.scrollable.update();704 helper.scrollable.scrollToElement($element);705 helper.scrollable.update();706 const expectedTopOffset = direction !== 'horizontal' ? elementOffset.top : 0;707 const expectedLeftOffset = direction !== 'vertical' ? elementOffset.left : 0;708 helper.checkScrollOffset({ left: expectedLeftOffset, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });709 helper.checkScrollTranslateValues({ vertical: 23, horizontal: 23 });710 });711 QUnit.test(`Scroll from right-top to left-bottom, direction: ${direction}, rtlEnabled: false`, function() {712 const helper = new ScrollableTestHelper({ direction, useNative, useSimulatedScrollbar, rtlEnabled: false });713 setInitialState();714 const $element = $('#element').css({ top: elementOffset.top, left: elementOffset.left });715 helper.scrollable.scrollTo({ left: helper.getMaxScrollOffset().horizontal });716 helper.scrollable.update();717 helper.scrollable.scrollToElement($element);718 helper.scrollable.update();719 const expectedTopOffset = direction !== 'horizontal' ? helper.$container.get(0).offsetHeight + elementHeight + helper.getScrollbarSize('Height') : 0;720 const expectedLeftOffset = direction !== 'vertical' ? elementOffset.left : 0;721 helper.checkScrollOffset({ left: expectedLeftOffset, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });722 helper.checkScrollTranslateValues({ vertical: 16, horizontal: 23 });723 });724 });725 QUnit.test(`Scroll from left to right, bottom border on scrollbar, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, direction: both, rtlEnabled: false`, function() {726 const helper = new ScrollableTestHelper({ direction: 'both', useNative, useSimulatedScrollbar, rtlEnabled: false });727 setInitialState();728 helper.scrollable.scrollTo({ top: helper.$container.get(0).offsetHeight + elementHeight + helper.getScrollbarSize('Height') / 2 });729 helper.scrollable.update();730 const $element = $('#element').css({ top: elementOffset.top, left: elementOffset.left });731 helper.scrollable.scrollToElement($element);732 helper.scrollable.update();733 const expectedLeftOffset = helper.$container.get(0).offsetWidth + elementWidth + helper.getScrollbarSize('Width');734 const expectedTopOffset = helper.$container.get(0).offsetHeight + elementHeight + helper.getScrollbarSize('Height');735 helper.checkScrollOffset({ left: expectedLeftOffset, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });736 helper.checkScrollTranslateValues({ vertical: 16, horizontal: 18 });737 });738 QUnit.test(`Scroll from top to bottom, right border on scrollbar, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, direction: both, rtlEnabled: false`, function() {739 const helper = new ScrollableTestHelper({ direction: 'both', useNative, useSimulatedScrollbar, rtlEnabled: false });740 setInitialState();741 helper.scrollable.scrollTo({ left: helper.$container.get(0).offsetWidth + elementWidth + helper.getScrollbarSize('Width') / 2 });742 helper.scrollable.update();743 const $element = $('#element').css({ top: elementOffset.top, left: elementOffset.left });744 helper.scrollable.scrollToElement($element);745 helper.scrollable.update();746 const expectedLeftOffset = helper.$container.get(0).offsetWidth + elementWidth + helper.getScrollbarSize('Width');747 const expectedTopOffset = helper.$container.get(0).offsetHeight + elementHeight + helper.getScrollbarSize('Height');748 helper.checkScrollOffset({ left: expectedLeftOffset, top: expectedTopOffset, maxScrollOffset: helper.getMaxScrollOffset().horizontal });749 helper.checkScrollTranslateValues({ vertical: 16, horizontal: 18 });750 });751 });752 QUnit.module(`ScrollPosition after update(), native: ${useNative}`, moduleConfig, () => {753 QUnit.test(`direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, rtl: false -> scrollTo(left: center) -> scrollTo(left: max)`, function() {754 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: false });755 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 50 });756 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });757 helper.scrollable.update();758 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 50 });759 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });760 helper.scrollable.scrollTo({ left: 25 });761 helper.scrollable.update();762 helper.checkScrollOffset({ left: 25, top: 0, maxScrollOffset: 50 });763 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 12 });764 helper.scrollable.scrollTo({ left: 50 });765 helper.scrollable.update();766 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 });767 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });768 });769 QUnit.test(`direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, rtl: true -> scrollTo(left: center) -> scrollTo(left: 0)`, function() {770 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: true });771 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 });772 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });773 helper.scrollable.update();774 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 });775 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });776 helper.scrollable.scrollTo({ left: 25 });777 helper.scrollable.update();778 helper.checkScrollOffset({ left: 25, top: 0, maxScrollOffset: 50 });779 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 12 });780 helper.scrollable.scrollTo({ left: 0 });781 helper.scrollable.update();782 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 50 });783 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });784 });785 QUnit.test(`Change content size, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, direction: horizontal, rtl: false -> change content size`, function() {786 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: false });787 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 50 });788 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });789 helper.$scrollable.find('.content1').css('width', '200px');790 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 150 });791 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });792 helper.scrollable.update();793 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 150 });794 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });795 });796 QUnit.test(`direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, rtl: true -> change content size`, function() {797 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: true });798 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 });799 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });800 helper.$scrollable.find('.content1').css('width', '200px');801 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 150 });802 helper.checkScrollTranslateValues({ vertical: 0, horizontal: useNative && useSimulatedScrollbar ? 12 : 25 });803 helper.scrollable.update();804 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 150 });805 helper.checkScrollTranslateValues({ vertical: 0, horizontal: !useNative || (useNative && useSimulatedScrollbar) ? 12 : 35 });806 });807 });808 QUnit.module(`ScrollPosition after resize, rtl: true, native: ${useNative}`, moduleConfig, () => {809 QUnit.test(`Direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, initialScrollPosition(Right), content.width:100, container.width(50) -> container.width(75) -> container.width(100)`, function() {810 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: true });811 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 }, 'initial rendering');812 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });813 helper.setContainerWidth(75);814 helper.scrollable.update();815 helper.checkScrollOffset({ left: 25, top: 0, maxScrollOffset: 25 }, 'scrolled to max right position after resize to 75px');816 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 19 });817 helper.setContainerWidth(100);818 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 0 }, 'scrolled to max right position after resize to 75px');819 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });820 });821 QUnit.test(`Direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, initialScrollPosition(Right), content.width:100, container.width(75) -> container.width(50) -> container.width(100)`, function() {822 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: true });823 helper.setContainerWidth(75);824 helper.checkScrollOffset({ left: 25, top: 0, maxScrollOffset: 25 }, 'scrolled to max right position after resize to 75px');825 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 19 });826 helper.setContainerWidth(50);827 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 }, 'scrolled to max right position after resize to 50px');828 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });829 helper.setContainerWidth(100);830 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 0 }, 'scrolled to max right position after resize to 100px');831 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });832 });833 QUnit.test(`Direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, initialScrollPosition(Right), content.width:100, container.width(50) -> container.width(100) -> container.width(75)`, function() {834 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: true });835 helper.setContainerWidth(50);836 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 }, 'scrolled to max right position after resize to 50px');837 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });838 helper.setContainerWidth(100);839 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 0 }, 'scrolled to max right position after resize to 100px');840 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });841 helper.setContainerWidth(75);842 helper.checkScrollOffset({ left: 25, top: 0, maxScrollOffset: 25 }, 'scrolled to max right position after resize to 75px');843 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 19 });844 });845 [1, 10, 20].forEach(scrollOffset => {846 QUnit.test(`Direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, initialScrollPosition(Right), content.width:100, container.width(50), scrollTo(Right - ${scrollOffset}) -> container.width(75) -> container.width(50) -> container.width(100) -> container.width(50)`, function() {847 const helper = new ScrollableTestHelper({848 direction: 'horizontal',849 useNative,850 useSimulatedScrollbar,851 rtlEnabled: true852 });853 const maxOffset = helper.getMaxScrollOffset();854 helper.scrollable.scrollTo({ left: maxOffset.horizontal - scrollOffset });855 helper.scrollable.update();856 helper.setContainerWidth(75);857 helper.checkScrollOffset({ left: helper.getMaxScrollOffset().horizontal - scrollOffset, top: 0, maxScrollOffset: 25 }, 'scrolled to max right position after resize to 75px');858 helper.checkScrollTranslateValues({ vertical: 0, horizontal: (helper.getMaxScrollOffset().horizontal - scrollOffset) * 0.75 });859 helper.setContainerWidth(50);860 helper.checkScrollOffset({ left: helper.getMaxScrollOffset().horizontal - scrollOffset, top: 0, maxScrollOffset: 50 }, 'scrolled to max right position after resize to 50px');861 helper.checkScrollTranslateValues({ vertical: 0, horizontal: (helper.getMaxScrollOffset().horizontal - scrollOffset) * 0.5 });862 helper.setContainerWidth(100);863 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 0 }, 'scrolled to max right position after resize to 100px');864 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });865 helper.setContainerWidth(50);866 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 }, 'scrolled to max right position after resize to 50px');867 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });868 });869 });870 [30, 40, 50].forEach(scrollOffset => {871 QUnit.test(`Direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, initialScrollPosition(Left), content.width:100, container.width(50), scrollTo(${scrollOffset}) -> container.width(75) -> container.width(50) -> width(100) -> container.width(50)`, function() {872 const helper = new ScrollableTestHelper({873 direction: 'horizontal',874 useNative,875 useSimulatedScrollbar,876 rtlEnabled: true877 });878 helper.scrollable.scrollTo({ left: scrollOffset });879 helper.scrollable.update();880 helper.setContainerWidth(75);881 helper.checkScrollOffset({ left: scrollOffset - 25, top: 0, maxScrollOffset: 25 }, 'scrolled to max right position after resize to 75px');882 helper.checkScrollTranslateValues({ vertical: 0, horizontal: (scrollOffset - 25) * 0.75 });883 helper.setContainerWidth(50);884 helper.checkScrollOffset({ left: scrollOffset, top: 0, maxScrollOffset: 50 }, 'scrolled to max right position after resize to 50px');885 helper.checkScrollTranslateValues({ vertical: 0, horizontal: scrollOffset * 0.5 });886 helper.setContainerWidth(100);887 helper.checkScrollOffset({ left: 0, top: 0, maxScrollOffset: 0 }, 'scrolled to max right position after resize to 100px');888 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 0 });889 helper.setContainerWidth(50);890 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 }, 'scrolled to max right position after resize to 50px');891 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });892 });893 });894 if(!browser.msie) {895 [0, 10, 20].forEach(scrollRight => {896 QUnit.test(`Direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, initialScrollPosition(Right - ${scrollRight}), css.zoomIn -> css.zoomOut`, function() {897 const helper = new ScrollableTestHelper({898 direction: 'horizontal',899 useNative,900 useSimulatedScrollbar,901 rtlEnabled: true902 });903 const maxOffset = helper.getMaxScrollOffset();904 helper.scrollable.scrollTo({ left: maxOffset.horizontal - scrollRight });905 helper.scrollable.update();906 [1, 1.1, 1].forEach(zoomLevel => {907 helper.scrollable._getWindowDevicePixelRatio = () => zoomLevel;908 helper.scrollable.$element().css('zoom', zoomLevel);909 helper.checkScrollOffset({ left: 50 - scrollRight, top: 0, maxScrollOffset: 50, epsilon: 1.1 });910 helper.checkScrollTranslateValues({ vertical: 0, horizontal: (50 - scrollRight) * 0.5 });911 });912 });913 QUnit.test(`Direction: horizontal, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, initialScrollPosition(Left: ${scrollRight}), css.zoomIn -> css.zoomOut`, function() {914 const helper = new ScrollableTestHelper({915 direction: 'horizontal',916 useNative,917 useSimulatedScrollbar,918 rtlEnabled: true919 });920 helper.scrollable.scrollTo({ left: scrollRight });921 helper.scrollable.update();922 [1, 1.1, 1].forEach(zoomLevel => {923 helper.scrollable._getWindowDevicePixelRatio = () => zoomLevel;924 helper.scrollable.$element().css('zoom', zoomLevel);925 helper.checkScrollOffset({ left: scrollRight, top: 0, maxScrollOffset: 50, epsilon: 1.1 });926 helper.checkScrollTranslateValues({ vertical: 0, horizontal: scrollRight * 0.5 });927 });928 });929 });930 }931 QUnit.test(`Direction: horizontal, rtl: true, useNative: ${useNative}, useSimulatedScrollbar: ${useSimulatedScrollbar}, rtlEnabled: true, scroll save the max right position when width of window was changed`, function(assert) {932 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, useSimulatedScrollbar, rtlEnabled: true });933 assert.strictEqual(helper.scrollable.scrollLeft(), 50, 'scrolled to max right position');934 helper.checkScrollOffset({ left: 50, top: 0, maxScrollOffset: 50 });935 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 25 });936 helper.scrollable.scrollTo({ left: 25 });937 helper.scrollable.update();938 resizeCallbacks.fire();939 assert.strictEqual(helper.scrollable.scrollLeft(), 25, 'scrolled to max right position');940 helper.checkScrollOffset({ left: 25, top: 0, maxScrollOffset: 50 });941 helper.checkScrollTranslateValues({ vertical: 0, horizontal: 12 });942 });943 });944 });945 QUnit.module(`Scroll arguments, native: ${useNative}`, moduleConfig, () => {946 QUnit.test('Direction: vertical, rtl: false, scrollPosition: { top: 0 } -> { top: 1 } -> { top: center } -> { top: max-1 } -> { top: max }', function() {947 const helper = new ScrollableTestHelper({ direction: 'vertical', useNative, rtlEnabled: false });948 const maxOffset = helper.getMaxScrollOffset();949 helper.$container.trigger('scroll');950 helper.checkScrollEvent({ reachedTop: true, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });951 helper.onScrollHandler.reset();952 helper.scrollable.scrollTo({ top: 1 });953 helper.$container.trigger('scroll');954 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });955 helper.onScrollHandler.reset();956 helper.scrollable.scrollTo({ top: 25 });957 helper.$container.trigger('scroll');958 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });959 helper.onScrollHandler.reset();960 helper.scrollable.scrollTo({ top: maxOffset.vertical - 1 });961 helper.$container.trigger('scroll');962 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });963 helper.onScrollHandler.reset();964 helper.scrollable.scrollTo({ top: maxOffset.vertical });965 helper.$container.trigger('scroll');966 helper.checkScrollEvent({ reachedTop: false, reachedBottom: true, reachedLeft: undefined, reachedRight: undefined });967 });968 QUnit.test('Direction: horizontal, rtl: false, scrollPosition: { left: 0 } -> { left: 1 } -> { left: center } -> { left: max-1 } -> { left: max }', function() {969 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, rtlEnabled: false });970 const maxOffset = helper.getMaxScrollOffset();971 helper.$container.trigger('scroll');972 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: true, reachedRight: false });973 helper.onScrollHandler.reset();974 helper.scrollable.scrollTo({ left: 1 });975 helper.$container.trigger('scroll');976 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: false });977 helper.onScrollHandler.reset();978 helper.scrollable.scrollTo({ left: 25 });979 helper.$container.trigger('scroll');980 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: false });981 helper.onScrollHandler.reset();982 helper.scrollable.scrollTo({ left: maxOffset.horizontal - 1 });983 helper.$container.trigger('scroll');984 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: false });985 helper.onScrollHandler.reset();986 helper.scrollable.scrollTo({ left: maxOffset.horizontal });987 helper.$container.trigger('scroll');988 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: true });989 });990 QUnit.test('Direction: both, rtl: false, scrollPosition: { top: 0, left: 0 } -> { top:1, left: 1 } -> { top: center, left: center } -> { top: max-1, left: max-1 } -> { top: max, left: max }', function() {991 const helper = new ScrollableTestHelper({ direction: 'both', useNative, rtlEnabled: false });992 const maxOffset = helper.getMaxScrollOffset();993 helper.$container.trigger('scroll');994 helper.checkScrollEvent({ reachedTop: true, reachedBottom: false, reachedLeft: true, reachedRight: false });995 helper.onScrollHandler.reset();996 helper.scrollable.scrollTo({ top: 1, left: 1 });997 helper.$container.trigger('scroll');998 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: false, reachedRight: false });999 helper.onScrollHandler.reset();1000 helper.scrollable.scrollTo({ top: 25, left: 25 });1001 helper.$container.trigger('scroll');1002 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: false, reachedRight: false });1003 helper.onScrollHandler.reset();1004 helper.scrollable.scrollTo({ top: maxOffset.vertical - 1, left: maxOffset.horizontal - 1 });1005 helper.$container.trigger('scroll');1006 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: false, reachedRight: false });1007 helper.onScrollHandler.reset();1008 helper.scrollable.scrollTo({ top: maxOffset.vertical, left: maxOffset.horizontal });1009 helper.$container.trigger('scroll');1010 helper.checkScrollEvent({ reachedTop: false, reachedBottom: true, reachedLeft: false, reachedRight: true });1011 });1012 QUnit.test('Direction: vertical, rtl: true, scrollPosition: { top: 0 } -> { top: 1 } -> { top: center } -> { top: max-1 } -> { top: max }', function() {1013 const helper = new ScrollableTestHelper({ direction: 'vertical', useNative, rtlEnabled: true });1014 const maxOffset = helper.getMaxScrollOffset();1015 helper.$container.trigger('scroll');1016 helper.checkScrollEvent({ reachedTop: true, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });1017 helper.onScrollHandler.reset();1018 helper.scrollable.scrollTo({ top: 1 });1019 helper.$container.trigger('scroll');1020 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });1021 helper.onScrollHandler.reset();1022 helper.scrollable.scrollTo({ top: 25 });1023 helper.$container.trigger('scroll');1024 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });1025 helper.onScrollHandler.reset();1026 helper.scrollable.scrollTo({ top: maxOffset.vertical - 1 });1027 helper.$container.trigger('scroll');1028 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: undefined, reachedRight: undefined });1029 helper.onScrollHandler.reset();1030 helper.scrollable.scrollTo({ top: maxOffset.vertical });1031 helper.$container.trigger('scroll');1032 helper.checkScrollEvent({ reachedTop: false, reachedBottom: true, reachedLeft: undefined, reachedRight: undefined });1033 });1034 QUnit.test('Direction: horizontal, rtl: true, scrollPosition: { left: max } -> { left: max-1 } -> { left: center } -> { left: 1 } -> { left: 0 }', function() {1035 const helper = new ScrollableTestHelper({ direction: 'horizontal', useNative, rtlEnabled: true });1036 const maxOffset = helper.getMaxScrollOffset();1037 helper.$container.trigger('scroll');1038 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: true });1039 helper.onScrollHandler.reset();1040 helper.scrollable.scrollTo({ left: maxOffset.horizontal - 1 });1041 helper.$container.trigger('scroll');1042 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: false });1043 helper.onScrollHandler.reset();1044 helper.scrollable.scrollTo({ left: 25 });1045 helper.$container.trigger('scroll');1046 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: false });1047 helper.onScrollHandler.reset();1048 helper.scrollable.scrollTo({ left: 1 });1049 helper.$container.trigger('scroll');1050 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: false, reachedRight: false });1051 helper.onScrollHandler.reset();1052 helper.scrollable.scrollTo({ left: 0 });1053 helper.$container.trigger('scroll');1054 helper.checkScrollEvent({ reachedTop: undefined, reachedBottom: undefined, reachedLeft: true, reachedRight: false });1055 });1056 QUnit.test('Direction: both, rtl: true, scrollPosition: { top: 0, left: max } -> { top:1, left: max-1 } -> { top: center, left: center } -> { top: max-1, left: 1 } -> { top: max, left: 0 }', function() {1057 const helper = new ScrollableTestHelper({ direction: 'both', useNative, rtlEnabled: true });1058 const maxOffset = helper.getMaxScrollOffset();1059 helper.$container.trigger('scroll');1060 helper.checkScrollEvent({ reachedTop: true, reachedBottom: false, reachedLeft: false, reachedRight: true });1061 helper.onScrollHandler.reset();1062 helper.scrollable.scrollTo({ top: 1, left: maxOffset.horizontal - 1 });1063 helper.$container.trigger('scroll');1064 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: false, reachedRight: false });1065 helper.onScrollHandler.reset();1066 helper.scrollable.scrollTo({ top: 25, left: 25 });1067 helper.$container.trigger('scroll');1068 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: false, reachedRight: false });1069 helper.onScrollHandler.reset();1070 helper.scrollable.scrollTo({ top: maxOffset.vertical - 1, left: 1 });1071 helper.$container.trigger('scroll');1072 helper.checkScrollEvent({ reachedTop: false, reachedBottom: false, reachedLeft: false, reachedRight: false });1073 helper.onScrollHandler.reset();1074 helper.scrollable.scrollTo({ top: maxOffset.vertical, left: 0 });1075 helper.$container.trigger('scroll');1076 helper.checkScrollEvent({ reachedTop: false, reachedBottom: true, reachedLeft: true, reachedRight: false });1077 });1078 });...
scrollable.useNative.tests.js
Source:scrollable.useNative.tests.js
1import $ from 'jquery';2import { getTranslateValues } from 'renovation/ui/scroll_view/utils/get_translate_values';3import animationFrame from 'animation/frame';4import pointerMock from '../../../helpers/pointerMock.js';5import 'generic_light.css!';6import {7 SCROLLABLE_CONTAINER_CLASS,8 SCROLLABLE_CONTENT_CLASS,9 SCROLLABLE_SCROLLBAR_CLASS,10 SCROLLABLE_SCROLL_CLASS,11 SCROLLBAR_VERTICAL_CLASS,12 SCROLLBAR_HORIZONTAL_CLASS,13 SCROLLABLE_NATIVE_CLASS14} from './scrollable.constants.js';15const moduleConfig = {16 beforeEach: function() {17 const markup = '\18 <div id="scrollable" style="height: 50px; width: 50px;">\19 <div class="content1" style="height: 100px; width: 100px;"></div>\20 <div class="content2"></div>\21 </div>';22 $('#qunit-fixture').html(markup);23 this.clock = sinon.useFakeTimers();24 this._originalRequestAnimationFrame = animationFrame.requestAnimationFrame;25 animationFrame.requestAnimationFrame = function(callback) {26 callback();27 };28 },29 afterEach: function() {30 this.clock.restore();31 animationFrame.requestAnimationFrame = this._originalRequestAnimationFrame;32 }33};34const getScrollOffset = function($scrollable) {35 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);36 const $container = $scrollable.find('.' + SCROLLABLE_CONTAINER_CLASS);37 const location = getTranslateValues($content.get(0));38 return {39 top: location.top - $container.scrollTop(),40 left: location.left - $container.scrollLeft()41 };42};43QUnit.module('useNative', moduleConfig);44QUnit.test('scrollable render', function(assert) {45 const $scrollable = $('#scrollable').dxScrollable({46 useNative: true47 });48 assert.ok($scrollable.hasClass(SCROLLABLE_NATIVE_CLASS), 'dx-scrollable-native class attached');49});50QUnit.test('simulated scroll does not work when using native', function(assert) {51 const $scrollable = $('#scrollable').dxScrollable({52 useNative: true53 });54 const mouse = pointerMock($scrollable.find('.' + SCROLLABLE_CONTENT_CLASS)).start();55 const distance = -10;56 const startLocation = getScrollOffset($scrollable);57 mouse58 .down()59 .move(0, distance)60 .up();61 const location = getScrollOffset($scrollable);62 assert.equal(location.top, startLocation.top, 'scroll does not move');63});64QUnit.test('scroll action fired for simulated scroller during native scroll', function(assert) {65 const done = assert.async();66 const $scrollable = $('#scrollable').dxScrollable({67 inertiaEnabled: false,68 useNative: false,69 onScroll: function(args) {70 assert.equal(args.scrollOffset.top, 10, 'scroll action fired with right offset');71 done();72 },73 });74 $scrollable.find('.' + SCROLLABLE_CONTAINER_CLASS).scrollTop(10);75});76QUnit.test('scroll action fired when scrollable scrolling', function(assert) {77 assert.expect(2);78 const $scrollable = $('#scrollable').dxScrollable({79 useNative: true,80 onScroll: function() {81 assert.ok(true, 'scroll fired');82 }83 });84 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);85 const pointer = pointerMock($container).start().wheel(10);86 $container.scrollTop(10);87 pointer.wheel(10);88});89QUnit.test('scroll action should be fired when scroll location does not changed', function(assert) {90 assert.expect(2);91 const $scrollable = $('#scrollable').dxScrollable({92 useNative: true,93 onScroll: function() {94 assert.ok(true, 'scroll fired');95 }96 });97 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);98 pointerMock($container)99 .start()100 .wheel(0)101 .wheel(0);102});103QUnit.test('scrollBy', function(assert) {104 const $scrollable = $('#scrollable').dxScrollable({105 useNative: true106 });107 const instance = $scrollable.dxScrollable('instance');108 instance.scrollBy(10);109 assert.equal(instance.scrollTop(), 10, 'container has correctly position');110 instance.scrollBy(20);111 assert.equal(instance.scrollTop(), 30, 'container has correctly position');112});113QUnit.test('scrollTo', function(assert) {114 const $scrollable = $('#scrollable').dxScrollable({115 useNative: true116 });117 const instance = $scrollable.dxScrollable('instance');118 $scrollable.dxScrollable('scrollTo', 10);119 assert.equal(instance.scrollTop(), 10, 'container has correctly position');120 $scrollable.dxScrollable('scrollTo', 20);121 assert.equal(instance.scrollTop(), 20, 'container has correctly position');122});123QUnit.test('useSimulatedScrollbar = false do not create scrollbars when useNative true', function(assert) {124 const $scrollable = $('#scrollable').dxScrollable({125 useNative: true,126 useSimulatedScrollbar: false127 });128 assert.equal($scrollable.find('.' + SCROLLABLE_SCROLLBAR_CLASS).length, 0);129});130QUnit.test('useSimulatedScrollbar = true create scrollbars when useNative true', function(assert) {131 const $scrollable = $('#scrollable').dxScrollable({132 useNative: true,133 useSimulatedScrollbar: true134 });135 assert.equal($scrollable.find('.' + SCROLLABLE_SCROLLBAR_CLASS).length, 1);136});137QUnit.test('useSimulatedScrollbar = false remove old scrollbars when useNative true', function(assert) {138 const $scrollable = $('#scrollable').dxScrollable({139 useNative: true,140 useSimulatedScrollbar: true141 });142 $scrollable.dxScrollable('option', 'useSimulatedScrollbar', false);143 assert.equal($scrollable.find('.' + SCROLLABLE_SCROLLBAR_CLASS).length, 0);144});145QUnit.test('simulatedScrollbar direction', function(assert) {146 const $scrollable = $('#scrollable').dxScrollable({147 useNative: true,148 useSimulatedScrollbar: true149 });150 assert.equal($scrollable.find('.' + SCROLLBAR_VERTICAL_CLASS).length, 1, 'vertical scrollbar was been added');151 assert.equal($scrollable.find('.' + SCROLLBAR_HORIZONTAL_CLASS).length, 0, 'horizontal scrollbar was not been added');152 $scrollable.dxScrollable('option', 'direction', 'horizontal');153 assert.equal($scrollable.find('.' + SCROLLBAR_VERTICAL_CLASS).length, 0, 'vertical scrollbar was not been added');154 assert.equal($scrollable.find('.' + SCROLLBAR_HORIZONTAL_CLASS).length, 1, 'horizontal scrollbar was been added');155 $scrollable.dxScrollable('option', 'direction', 'both');156 assert.equal($scrollable.find('.' + SCROLLBAR_VERTICAL_CLASS).length, 1, 'vertical scrollbar was been added');157 assert.equal($scrollable.find('.' + SCROLLBAR_HORIZONTAL_CLASS).length, 1, 'horizontal scrollbar was been added');158});159QUnit.test('simulatedScrollbar visibility', function(assert) {160 const $scrollable = $('#scrollable').dxScrollable({161 useNative: true,162 useSimulatedScrollbar: true163 });164 const $scroll = $scrollable.find(`.${SCROLLBAR_VERTICAL_CLASS} .dx-scrollable-scroll`);165 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);166 assert.equal($scroll.hasClass('dx-state-invisible'), true, 'on start thumb is hidden');167 pointerMock($container)168 .start()169 .wheel(10);170 assert.equal($scroll.hasClass('dx-state-invisible'), false, 'after move thumb is visible');171});172QUnit.test('scrollbar height calculated correctly when simulatedScrollbar is true', function(assert) {173 const containerHeight = 50;174 const contentHeight = 100;175 const scrollHeight = (containerHeight / contentHeight) * containerHeight;176 const $scrollable = $('#scrollable').dxScrollable({177 useNative: true,178 useSimulatedScrollbar: true179 });180 const $container = $scrollable.find('.' + SCROLLABLE_CONTAINER_CLASS);181 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);182 const $scroll = $scrollable.find('.' + SCROLLABLE_SCROLL_CLASS);183 $container.height(containerHeight);184 $content.height(contentHeight);185 $scrollable.dxScrollable('instance').update();186 assert.equal($scroll.outerHeight(), scrollHeight, 'scrollbar height calculated correctly');187});188QUnit.test('moving scrollable moves scrollbar', function(assert) {189 const containerHeight = 50;190 const contentHeight = 100;191 const distance = 10;192 const scrollbarDistance = distance * (containerHeight / contentHeight);193 const $scrollable = $('#scrollable').dxScrollable({194 useNative: true,195 useSimulatedScrollbar: true196 });197 const $content = $scrollable.find('.' + SCROLLABLE_CONTENT_CLASS);198 const $container = $scrollable.find('.' + SCROLLABLE_CONTAINER_CLASS);199 const $scroll = $scrollable.find('.' + SCROLLABLE_SCROLL_CLASS);200 $container.height(containerHeight);201 $content.height(contentHeight);202 $scrollable.dxScrollable('instance').update();203 $scrollable.dxScrollable('scrollTo', 2 * distance);204 $container.trigger('scroll');205 const location = getTranslateValues($scroll.get(0));206 assert.equal(location.top, 2 * scrollbarDistance, 'scrollbar follows pointer everytime');207});208QUnit.test('scrollbar appears for simulated scrolling even when useSimulatedScrollbar is false', function(assert) {209 const $scrollable = $('#scrollable').dxScrollable({210 useNative: false,211 useSimulatedScrollbar: false,212 inertiaEnabled: false213 });214 const $scroll = $scrollable.find(`.${SCROLLBAR_VERTICAL_CLASS} .dx-scrollable-scroll`);215 assert.equal($scroll.hasClass('dx-state-invisible'), true, 'scrollbar is hidden before scrolling');216 pointerMock($scrollable.find('.' + SCROLLABLE_CONTENT_CLASS))217 .start()218 .down()219 .move(0, -1);220 assert.equal($scroll.hasClass('dx-state-invisible'), false, 'scrollbar is shown during scrolling');221});222QUnit.test('scrollOffset', function(assert) {223 const $scrollable = $('#scrollable').dxScrollable({224 useNative: true225 });226 const instance = $scrollable.dxScrollable('instance');227 instance.scrollTo(10);228 assert.deepEqual(instance.scrollOffset(), { top: 10, left: 0 }, 'scrollOffset is correct');229});230QUnit.test('scrollHeight', function(assert) {231 const $scrollable = $('#scrollable').dxScrollable({232 useNative: true233 });234 const $content = $('.' + SCROLLABLE_CONTENT_CLASS, $scrollable);235 $content.css('padding', '10px');236 assert.equal($scrollable.dxScrollable('scrollHeight'), $content.outerHeight(), 'scroll height equals to content height');237});238QUnit.test('clientHeight', function(assert) {239 const $scrollable = $('#scrollable').dxScrollable({240 useNative: true241 });242 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);243 assert.equal($scrollable.dxScrollable('clientHeight'), $container.height(), 'client height equals to container height');244});245QUnit.test('scrollWidth', function(assert) {246 const $scrollable = $('#scrollable').dxScrollable({247 useNative: true248 });249 const $content = $('.' + SCROLLABLE_CONTENT_CLASS, $scrollable);250 assert.equal($scrollable.dxScrollable('scrollWidth'), $content.width(), 'scroll width equals to content width');251});252QUnit.test('clientWidth', function(assert) {253 const $scrollable = $('#scrollable').dxScrollable({254 useNative: true255 });256 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);257 $container.css({ overflowY: 'hidden' });258 assert.equal($scrollable.dxScrollable('clientWidth'), $container.width(), 'client width equals to container width');259});260QUnit.test('scroll reachedTop true only at the top', function(assert) {261 let currentScrollTopState = true;262 const $scrollable = $('#scrollable').dxScrollable({263 useNative: true,264 onScroll: function(e) {265 assert.equal(e.reachedLeft, undefined, 'reached left is not defined');266 assert.equal(e.reachedRight, undefined, 'reached right is not defined');267 assert.equal(e.reachedTop, currentScrollTopState, 'reached top is correct');268 }269 });270 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);271 $container.trigger('scroll');272 currentScrollTopState = false;273 $scrollable.dxScrollable('scrollTo', 1);274 $container.trigger('scroll');275 currentScrollTopState = true;276 $scrollable.dxScrollable('scrollTo', 0);277 $container.trigger('scroll');278}),279QUnit.test('scroll reachedBottom true only at the bottom', function(assert) {280 let currentScrollBottomState = false;281 const $scrollable = $('#scrollable').dxScrollable({282 useNative: true,283 onScroll: function(e) {284 assert.equal(e.reachedLeft, undefined, 'reached left is not defined');285 assert.equal(e.reachedRight, undefined, 'reached right is not defined');286 assert.equal(e.reachedBottom, currentScrollBottomState, 'reached bottom is correct');287 }288 });289 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);290 const $content = $('.' + SCROLLABLE_CONTENT_CLASS, $scrollable);291 const containerSize = $container.prop('clientHeight');292 const contentSize = $content.outerHeight();293 $container.trigger('scroll');294 currentScrollBottomState = true;295 $scrollable.dxScrollable('scrollTo', contentSize - containerSize);296 $container.trigger('scroll');297 currentScrollBottomState = false;298 $scrollable.dxScrollable('scrollTo', contentSize - containerSize - 1);299 $container.trigger('scroll');300});301QUnit.test('scroll reachedLeft true only at the left border', function(assert) {302 let currentScrollLeftState = true;303 const $scrollable = $('#scrollable').width(100);304 $scrollable.children().width(200);305 $scrollable.dxScrollable({306 useNative: true,307 direction: 'horizontal',308 onScroll: function(e) {309 assert.equal(e.reachedLeft, currentScrollLeftState, 'reached left is correct');310 assert.equal(e.reachedTop, undefined, 'reached top is not defined');311 assert.equal(e.reachedBottom, undefined, 'reached bottom is not defined');312 }313 });314 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);315 $container.trigger('scroll');316 currentScrollLeftState = false;317 $scrollable.dxScrollable('scrollTo', 1);318 $container.trigger('scroll');319 currentScrollLeftState = true;320 $scrollable.dxScrollable('scrollTo', 0);321 $container.trigger('scroll');322});323QUnit.test('scroll reachedRight true only at the right border', function(assert) {324 let currentScrollLeftState = false;325 const $scrollable = $('#scrollable').width(100);326 $scrollable.children().width(200);327 $scrollable.dxScrollable({328 useNative: true,329 direction: 'horizontal',330 onScroll: function(e) {331 assert.equal(e.reachedRight, currentScrollLeftState, 'reached right is correct');332 assert.equal(e.reachedTop, undefined, 'reached top is not defined');333 assert.equal(e.reachedBottom, undefined, 'reached bottom is not defined');334 }335 });336 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);337 const $content = $('.' + SCROLLABLE_CONTENT_CLASS, $scrollable);338 const containerSize = $container.prop('clientWidth');339 const contentSize = $content.outerWidth();340 $container.trigger('scroll');341 currentScrollLeftState = true;342 $scrollable.dxScrollable('scrollTo', contentSize - containerSize);343 $container.trigger('scroll');344 currentScrollLeftState = false;345 $scrollable.dxScrollable('scrollTo', contentSize - containerSize - 1);346 $container.trigger('scroll');347});348QUnit.test('scroll args are correct', function(assert) {349 let top = true;350 let left = true;351 let right = false;352 let bottom = false;353 let lastScrollEventArgs;354 const $scrollable = $('#scrollable').width(100);355 $scrollable.children().width(200);356 $scrollable.dxScrollable({357 useNative: true,358 direction: 'both',359 onScroll: function(e) {360 lastScrollEventArgs = e;361 }362 });363 const checkLastScrollEvent = function() {364 assert.equal(lastScrollEventArgs.reachedTop, top, 'reached top is correct');365 assert.equal(lastScrollEventArgs.reachedRight, right, 'reached right is correct');366 assert.equal(lastScrollEventArgs.reachedBottom, bottom, 'reached bottom is correct');367 assert.equal(lastScrollEventArgs.reachedLeft, left, 'reached left is correct');368 };369 const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollable);370 const containerWidth = $container.prop('clientWidth');371 const contentWidth = $container.prop('scrollWidth');372 const containerHeight = $container.prop('clientHeight');373 const contentHeight = $container.prop('scrollHeight');374 assert.ok(!lastScrollEventArgs, 'scroll was not triggered on start');375 $container.trigger('scroll');376 checkLastScrollEvent();377 top = false;378 $scrollable.dxScrollable('scrollTo', { left: 0, top: 1 });379 $container.trigger('scroll');380 checkLastScrollEvent();381 left = false;382 $scrollable.dxScrollable('scrollTo', { left: 1, top: 1 });383 $container.trigger('scroll');384 checkLastScrollEvent();385 bottom = true;386 $scrollable.dxScrollable('scrollTo', {387 left: 1,388 top: contentHeight - containerHeight389 });390 $container.trigger('scroll');391 checkLastScrollEvent();392 right = true;393 $scrollable.dxScrollable('scrollTo', {394 left: contentWidth - containerWidth,395 top: contentHeight - containerHeight396 });397 $container.trigger('scroll');398 checkLastScrollEvent();...
scripts_prev.js
Source:scripts_prev.js
1$(function() {2 // FIELD WATERMARKS3 $('input[type="text"].username').watermark('Username', {useNative: false});4 $('input[type="password"].password').watermark('Password', {useNative: false});5 $('input[type="password"].passwordconfirm').watermark('Confirm Password', {useNative: false});6 $('input[type="text"].firstname').watermark('First Name', {useNative: false});7 $('input[type="text"].lastname').watermark('Last Name', {useNative: false});8 $('input[type="text"].month').watermark('MM', {useNative: false});9 $('input[type="text"].day').watermark('DD', {useNative: false});10 $('input[type="text"].year').watermark('YYYY', {useNative: false});11 $('input[type="text"].city').watermark('City', {useNative: false});12 $('input[type="text"].zip').watermark('Zip Code', {useNative: false});13 $('input[type="text"].email').watermark('Email', {useNative: false});14 $('input[type="text"].emailconfirm').watermark('Re-enter Email', {useNative: false});15 $('input[type="text"].search').watermark('Find Knowledge by Entering a Keyword', {useNative: false});16 $('input[type="text"].title').watermark('Enter in the Title for this Thread', {useNative: false});17 $('input[type="text"].topic').watermark('Enter in the Topic', {useNative: false});18 $('.field-jumppad').watermark('Enter in the Title for this JumpPad', {useNative: false});19 $('.comment').watermark('Share Some Knowledge', {useNative: false});20 $('input[type="text"].link').watermark('Enter in a Link to Outside Content', {useNative: false});21 $('input[type="text"].content').watermark('Find Content within SO:KNO', {useNative: false});22 $('.field-post').watermark('Share Some Knowledge by Adding a Comment', {useNative: false});23 $('.field-persona').watermark('Find People to Join this JumpPad', {useNative: false});24 $('.field-link').watermark('http://', {useNative: false});25 $('.field-content').watermark('Connect to Content', {useNative: false});26 // LOGIN/SIGNUP TOGGLE27 $("#signup, #forgot").hide();28 29 $('a.signup').click(function() {30 $('#forgot, #login').hide();31 $('#signup').show();32 });33 $('a.forgot').click(function() {34 $('#signup, #login').hide();35 $('#forgot').show();36 });37 $('a.login, a.back').click(function() {38 $('#signup, #forgot').hide();39 $('#login').show();40 });41 // TOGGLE THREAD/CONTENT LISTS42 $(".list.threads").hide();43 $('a.threads').click(function() {44 $('a.content').removeClass('current');45 $(this).addClass('current');46 $('.list.content').hide();47 $('.list.threads').show();48 });49 $('a.content').click(function() {50 $('a.threads').removeClass('current');51 $(this).addClass('current');52 $('.list.threads').hide();53 $('.list.content').show();54 });55 // LINK/CONTENT FIELDS TOGGLE56 $('input[type="text"].link, input[type="text"].content').hide();57 $('.button-link').click(function() {58 $(this).toggleClass('active');59 $(this).parent().prev().find('input.link').toggle();60 });61 $('.button-content').click(function() {62 $(this).toggleClass('active');63 $(this).parent().prev().find('input.content').toggle();64 });65 // MODAL WINDOWS66 $('a.thread, a.jumppad').click(function (e) {67 e.preventDefault();68 // CALLBACK FUNCTION69 confirm(function () {70 window.location.href = '';71 });72 function confirm(callback) {73 $('#modal-create').modal({74 position: ["256px"],75 opacity: ["80"],76 focus: false,77 overlayId: 'modal-overlay',78 containerId: 'modal-container',79 onShow: function (dialog) {80 var modal = this;81 // IF CLICKS CREATE82 $('.create', dialog.data[0]).click(function () {83 84 // CALL CALLBACK85 if ($.isFunction(callback)) {86 callback.apply();87 }88 // CLOSE MODAL89 modal.close();90 });91 }92 });93 }94 });95 // MODAL CONTACT96 $('a.contact-us').click(function (e) {97 e.preventDefault();98 // CALLBACK FUNCTION99 confirm(function () {100 window.location.href = '';101 });102 function confirm(callback) {103 $('#modal-contact').modal({104 position: ["36px"],105 opacity: ["60"],106 focus: false,107 overlayId: 'modal-overlay',108 containerId: 'modal-container-contact',109 onShow: function (dialog) {110 var modal = this;111 // IF CLICKS CREATE112 $('.create', dialog.data[0]).click(function () {113 114 // CALL CALLBACK115 if ($.isFunction(callback)) {116 callback.apply();117 }118 // CLOSE MODAL119 modal.close();120 });121 }122 });123 }124 });125 // iFRAME MODAL126 $('a.iframe').click(function (e) {127 e.preventDefault();128 // CALLBACK FUNCTION129 confirm(function () {130 window.location.href = '';131 });132 function confirm(callback) {133 $('#modal-iframe').modal({134 opacity: ["80"],135 focus: false,136 overlayId: 'modal-overlay',137 containerId: 'modal-iframe-container',138 onShow: function (dialog) {139 var modal = this;140 // IF CLICKS CREATE141 $('.create', dialog.data[0]).click(function () {142 143 // CALL CALLBACK144 if ($.isFunction(callback)) {145 callback.apply();146 }147 // CLOSE MODAL148 modal.close();149 });150 }151 });152 }153 var modalHeight = $('#modal-iframe-container').height();154 $('#modal-iframe > iframe').height(modalHeight - 58);155 });156 // MODAL CONTAINER HEIGHT157 158 // CONNECT MODAL159 $('a.connect').click(function (e) {160 e.preventDefault();161 // CALLBACK FUNCTION162 confirm(function () {163 window.location.href = '';164 });165 function confirm(callback) {166 $('#modal-connect').modal({167 position: ["256px"],168 opacity: ["80"],169 focus: false,170 overlayId: 'modal-overlay',171 containerId: 'modal-container',172 onShow: function (dialog) {173 var modal = this;174 // IF CLICKS CREATE175 $('.create', dialog.data[0]).click(function () {176 177 // CALL CALLBACK178 if ($.isFunction(callback)) {179 callback.apply();180 }181 // CLOSE MODAL182 modal.close();183 });184 }185 });186 }187 });188 189 // TOGGLE FOLLOW190 $('.button-follow a').click(function(){191 $(this).toggleClass('active');192 }193 );194 $('.button.wide.follow').click(function(){195 $(this).toggleClass('follow unfollow', function() {196 if($(this).hasClass("unfollow")) {197 $("span.label-icon").html("<span class='check'></span>Not Following");198 }199 else if($(this).hasClass("follow")) {200 $("span.label-icon").html("<span class='check'></span>Following");201 }202 203 });204 });205 206 // COMMENT TEXTAREA RESIZE207 $('.comment').autosize();208 209 // CLICK FOLLOW ALL210 $('a.followall').click(function(){211 if($('.mini-persona > .button-follow a').hasClass('active')===false){212 $('.mini-persona > .button-follow a').addClass('active');213 }214 }215 );216 217 // DEFAULT TAB ACTIVE218 //$('.date').addClass('active');219 220 221 // SORT MENU TABS222 $('.date').click(function(){223 if($(this).hasClass('active')===false){224 $('#nav-sort > li > a').removeClass('active');225 $(this).addClass('active');226 }227 }228 );229 230 $('.new').click(function(){231 if($(this).hasClass('active')===false){232 $('#nav-sort > li > a').removeClass('active');233 $(this).addClass('active');234 }235 }236 );237 238 $('.alpha').click(function(){239 if($(this).hasClass('active')===false){240 $('#nav-sort > li > a').removeClass('active');241 $(this).addClass('active');242 }243 }244 );245 246 $('.relevance').click(function(){247 if($(this).hasClass('active')===false){248 $('#nav-sort > li > a').removeClass('active');249 $(this).addClass('active');250 }251 }252 );253 $('a.followme').click(function(){254 if($(this).hasClass('active')===false){255 $('#nav-connections > li > a').removeClass('active');256 $(this).addClass('active');257 }258 }259 );260 $('a.followthem').click(function(){261 if($(this).hasClass('active')===false){262 $('#nav-connections > li > a').removeClass('active');263 $(this).addClass('active');264 }265 }266 );267 268 // CURATE MENU TABS269 $('a.like').click(function(){270 if($(this).hasClass('active')===false){271 $('a.flag').removeClass('active');272 $(this).addClass('active');273 }274 else {275 $(this).removeClass('active');276 }277 }278 );279 280 $('a.flag').click(function(){281 if($(this).hasClass('active')===false){282 $('a.like').removeClass('active');283 $(this).addClass('active');284 }285 else {286 $(this).removeClass('active');287 }288 }289 );290 $("#form-tags").hide();291 var setHeight = $('#modal-iframe > iframe').height();292 var tagger = function() {293 var tagsHeight = '138';294 var frameHeight = $('#modal-iframe > iframe').height();295 var minHeight = frameHeight - tagsHeight;296 var maxHeight = frameHeight + tagsHeight;297 $(this).toggleClass("active");298 $("#form-tags").slideToggle();299 $('#modal-iframe > iframe').animate({height: minHeight}, 400);300 };301 302 $("a.tag").click(tagger);303 304 // COMMENT MENU TABS305 $('.nav-comment > .like').click(function(){306 if($(this).hasClass('active')===false){307 $('.nav-comment > li > a').removeClass('active');308 $(this).addClass('active');309 }310 }311 );312 313 $('.nav-comment > .flag').click(function(){314 if($(this).hasClass('active')===false){315 $('.nav-comment > li > a').removeClass('active');316 $(this).addClass('active');317 }318 }319 );320 321 $('.nav-comment > .reply').click(function(){322 if($(this).hasClass('active')===false){323 $('.nav-comment > li > a').removeClass('active');324 $(this).addClass('active');325 }326 }327 );328 329 $('.nav-comment > .share').click(function(){330 if($(this).hasClass('active')===false){331 $('.nav-comment > li > a').removeClass('active');332 $(this).addClass('active');333 }334 }335 );336 // PERSONA CHARTS337 $('.cht-knowledge').easyPieChart({338 barColor: '#d97023',339 trackColor: '#f2f2f2',340 scaleColor: false,341 lineCap: 'butt',342 lineWidth: 40,343 size: 366,344 animate: 1000345 });346 $('.cht-interest').easyPieChart({347 barColor: '#2a8ecb',348 trackColor: '#f2f2f2',349 scaleColor: false,350 lineCap: 'butt',351 lineWidth: 40,352 size: 276,353 animate: 1000354 });...
scripts.js
Source:scripts.js
1$(function() {2 // FIELD WATERMARKS3 $('input[type="text"].username').watermark('Username', {useNative: false});4 $('input[type="password"].password').watermark('Password', {useNative: false});5 $('input[type="password"].passwordconfirm').watermark('Confirm Password', {useNative: false});6 $('input[type="text"].firstname').watermark('First Name', {useNative: false});7 $('input[type="text"].lastname').watermark('Last Name', {useNative: false});8 $('input[type="text"].month').watermark('MM', {useNative: false});9 $('input[type="text"].day').watermark('DD', {useNative: false});10 $('input[type="text"].year').watermark('YYYY', {useNative: false});11 $('input[type="text"].city').watermark('City', {useNative: false});12 $('input[type="text"].zip').watermark('Zip Code', {useNative: false});13 $('input[type="text"].email').watermark('Email', {useNative: false});14 $('input[type="text"].emailconfirm').watermark('Re-enter Email', {useNative: false});15 $('input[type="text"].search').watermark('Find Knowledge by Entering a Keyword', {useNative: false});16 $('input[type="text"].title').watermark('Enter in the Title for this Thread', {useNative: false});17 $('input[type="text"].topic').watermark('Enter in the Topic', {useNative: false});18 $('.field-jumppad').watermark('Enter in the Title for this JumpPad', {useNative: false});19 $('.comment').watermark('Share Some Knowledge', {useNative: false});20 $('input[type="text"].link').watermark('Enter in a Link to Outside Content', {useNative: false});21 $('input[type="text"].content').watermark('Find Content within SO:KNO', {useNative: false});22 $('.field-post').watermark('Share Some Knowledge by Adding a Comment', {useNative: false});23 $('.field-persona').watermark('Find People to Join this JumpPad', {useNative: false});24 $('.field-link').watermark('http://', {useNative: false});25 $('.field-content').watermark('Connect to Content', {useNative: false});26 // LOGIN/SIGNUP TOGGLE27 $("#signup, #forgot").hide();28 29 $('a.signup').click(function() {30 $('#forgot, #login').hide();31 $('#signup').show();32 });33 $('a.forgot').click(function() {34 $('#signup, #login').hide();35 $('#forgot').show();36 });37 $('a.login, a.back').click(function() {38 $('#signup, #forgot').hide();39 $('#login').show();40 });41 // TOGGLE THREAD/CONTENT LISTS42 $(".list.threads").hide();43 $('a.threads').click(function() {44 $('a.content').removeClass('current');45 $(this).addClass('current');46 $('.list.content').hide();47 $('.list.threads').show();48 });49 $('a.content').click(function() {50 $('a.threads').removeClass('current');51 $(this).addClass('current');52 $('.list.threads').hide();53 $('.list.content').show();54 });55 // LINK/CONTENT FIELDS TOGGLE56 $('input[type="text"].link, input[type="text"].content').hide();57 $('.button-link').click(function() {58 $(this).toggleClass('active');59 $(this).parent().prev().find('input.link').toggle();60 });61 $('.button-content').click(function() {62 $(this).toggleClass('active');63 $(this).parent().prev().find('input.content').toggle();64 });65 // MODAL WINDOWS66 $('a.thread, a.jumppad').click(function (e) {67 e.preventDefault();68 // CALLBACK FUNCTION69 confirm(function () {70 window.location.href = '';71 });72 function confirm(callback) {73 $('#modal-create').modal({74 position: ["256px"],75 opacity: ["80"],76 focus: false,77 overlayId: 'modal-overlay',78 containerId: 'modal-container',79 onShow: function (dialog) {80 var modal = this;81 // IF CLICKS CREATE82 $('.create', dialog.data[0]).click(function () {83 84 // CALL CALLBACK85 if ($.isFunction(callback)) {86 callback.apply();87 }88 // CLOSE MODAL89 modal.close();90 });91 }92 });93 }94 });95 // iFRAME MODAL96 $('a.iframe').click(function (e) {97 e.preventDefault();98 // CALLBACK FUNCTION99 confirm(function () {100 window.location.href = '';101 });102 function confirm(callback) {103 $('#modal-iframe').modal({104 opacity: ["80"],105 focus: false,106 overlayId: 'modal-overlay',107 containerId: 'modal-iframe-container',108 onShow: function (dialog) {109 var modal = this;110 // IF CLICKS CREATE111 $('.create', dialog.data[0]).click(function () {112 113 // CALL CALLBACK114 if ($.isFunction(callback)) {115 callback.apply();116 }117 // CLOSE MODAL118 modal.close();119 });120 }121 });122 }123 var modalHeight = $('#modal-iframe-container').height();124 $('#modal-iframe > iframe').height(modalHeight - 58);125 });126 // MODAL CONTAINER HEIGHT127 128 // CONNECT MODAL129 $('a.connect').click(function (e) {130 e.preventDefault();131 // CALLBACK FUNCTION132 confirm(function () {133 window.location.href = '';134 });135 function confirm(callback) {136 $('#modal-connect').modal({137 position: ["256px"],138 opacity: ["80"],139 focus: false,140 overlayId: 'modal-overlay',141 containerId: 'modal-container',142 onShow: function (dialog) {143 var modal = this;144 // IF CLICKS CREATE145 $('.create', dialog.data[0]).click(function () {146 147 // CALL CALLBACK148 if ($.isFunction(callback)) {149 callback.apply();150 }151 // CLOSE MODAL152 modal.close();153 });154 }155 });156 }157 });158 159 // TOGGLE FOLLOW160 $('.button-follow a').click(function(){161 $(this).toggleClass('active');162 }163 );164 $('.button.wide.follow').click(function(){165 $(this).toggleClass('follow unfollow', function() {166 if($(this).hasClass("unfollow")) {167 $("span.label-icon").html("<span class='check'></span>Not Following");168 }169 else if($(this).hasClass("follow")) {170 $("span.label-icon").html("<span class='check'></span>Following");171 }172 173 });174 });175 176 // COMMENT TEXTAREA RESIZE177 $('.comment').autosize();178 179 // CLICK FOLLOW ALL180 $('a.followall').click(function(){181 if($('.mini-persona > .button-follow a').hasClass('active')===false){182 $('.mini-persona > .button-follow a').addClass('active');183 }184 }185 );186 187 // DEFAULT TAB ACTIVE188 //$('.date').addClass('active');189 190 // SORT MENU TABS191 $('.date').click(function(){192 if($(this).hasClass('active')===false){193 $('#nav-sort > li > a').removeClass('active');194 $(this).addClass('active');195 }196 }197 );198 199 $('.new').click(function(){200 if($(this).hasClass('active')===false){201 $('#nav-sort > li > a').removeClass('active');202 $(this).addClass('active');203 }204 }205 );206 207 $('.alpha').click(function(){208 if($(this).hasClass('active')===false){209 $('#nav-sort > li > a').removeClass('active');210 $(this).addClass('active');211 }212 }213 );214 215 $('.relevance').click(function(){216 if($(this).hasClass('active')===false){217 $('#nav-sort > li > a').removeClass('active');218 $(this).addClass('active');219 }220 }221 );222 223 // CURATE MENU TABS224 $('a.like').click(function(){225 if($(this).hasClass('active')===false){226 $('a.flag').removeClass('active');227 $(this).addClass('active');228 }229 else {230 $(this).removeClass('active');231 }232 }233 );234 235 $('a.flag').click(function(){236 if($(this).hasClass('active')===false){237 $('a.like').removeClass('active');238 $(this).addClass('active');239 }240 else {241 $(this).removeClass('active');242 }243 }244 );245 $("#form-tags").hide();246 var setHeight = $('#modal-iframe > iframe').height();247 var tagger = function() {248 var tagsHeight = '138';249 var frameHeight = $('#modal-iframe > iframe').height();250 var minHeight = frameHeight - tagsHeight;251 var maxHeight = frameHeight + tagsHeight;252 $(this).toggleClass("active");253 $("#form-tags").slideToggle();254 $('#modal-iframe > iframe').animate({height: minHeight}, 400);255 };256 257 $("a.tag").click(tagger);258 259 // COMMENT MENU TABS260 $('.nav-comment > .like').click(function(){261 if($(this).hasClass('active')===false){262 $('.nav-comment > li > a').removeClass('active');263 $(this).addClass('active');264 }265 }266 );267 268 $('.nav-comment > .flag').click(function(){269 if($(this).hasClass('active')===false){270 $('.nav-comment > li > a').removeClass('active');271 $(this).addClass('active');272 }273 }274 );275 276 $('.nav-comment > .reply').click(function(){277 if($(this).hasClass('active')===false){278 $('.nav-comment > li > a').removeClass('active');279 $(this).addClass('active');280 }281 }282 );283 284 $('.nav-comment > .share').click(function(){285 if($(this).hasClass('active')===false){286 $('.nav-comment > li > a').removeClass('active');287 $(this).addClass('active');288 }289 }290 );291 292 ...
checkbox-x.js
Source:checkbox-x.js
1/*!2 * @copyright © Kartik Visweswaran, Krajee.com, 20143 * @version 1.5.14 *5 * An extended checkbox plugin for bootstrap with three states and additional styles.6 *7 * For more JQuery/Bootstrap plugins and demos visit http://plugins.krajee.com8 * For more Yii related demos visit http://demos.krajee.com9 */10(function ($) {11 "use strict";12 var CheckboxX = function (element, options) {13 var self = this;14 self.$element = $(element);15 self.disabled = self.$element.attr('disabled') || self.$element.attr('readonly');16 self.initialValue = self.$element.val();17 self.init(options);18 };1920 CheckboxX.prototype = {21 constructor: CheckboxX,22 init: function (options) {23 var self = this, $el = self.$element, isCbx = $el.is(':checkbox'), val = $el.val(),24 css = options.inline ? 'cbx-container' : 'cbx-container cbx-block';25 self.options = options;26 self.skipChange = false;27 if (isCbx && val !== 0 && val !== 1) {28 $el.attr('checked', false);29 if (options.threeState) {30 $el.prop('indeterminate', true);31 }32 }33 if (isCbx && options.useNative) {34 $el.on('change', function () {35 self.change(false);36 });37 $el.removeClass('cbx-loading');38 self.setCheckboxProp($el.val());39 return;40 }41 if (self.$container === undefined) {42 self.$container = $(document.createElement("div")).addClass(css).html(self.render());43 $el.before(self.$container);44 self.$container.append($el);45 $el.hide();46 }47 else {48 self.$container.before($el);49 self.$container.addClass(css).html(self.render());50 self.$container.append($el);51 }52 $el.removeClass('cbx-loading');53 self.$cbx = self.$container.find('.cbx');54 $el.closest('form').on('reset', function () {55 self.reset();56 });57 self.$cbx.on('click', function () {58 if (!isCbx && options.threeState) {59 return;60 }61 if (!options.enclosedLabel && !options.useNative) {62 if (options.threeState) {63 self.change(false);64 } else {65 self.skipChange = true;66 self.change(true);67 }68 }69 });70 self.$cbx.on('keyup', function (e) {71 if (e.which === 32) {72 self.change(true);73 }74 });75 if (isCbx && !options.useNative) {76 $el.on('change', function () {77 self.change(false, self.skipChange);78 });79 } else {80 $el.on('click', function () {81 self.change(false);82 });83 }84 },85 change: function (trigChange) {86 var self = this, $el = self.$element,87 skipTrig = arguments.length > 1 && arguments[1],88 useNative = self.options.useNative, newVal;89 if (self.disabled) {90 return;91 }92 newVal = self.calculate();93 if (!skipTrig) {94 $el.val(newVal);95 }96 if (trigChange && !useNative && !skipTrig) {97 $el.trigger('change');98 } else {99 self.validateCheckbox(useNative, newVal);100 }101 if (!useNative) {102 self.$cbx.html(self.getIndicator());103 }104 if (skipTrig) {105 self.skipChange = false;106 }107 },108 calculate: function () {109 var self = this, $el = self.$element, val = parseInt($el.val()),110 threeState = self.options.threeState;111 if (threeState) {112 return (val === 1 ? null : (val === 0 ? 1 : 0));113 } else {114 return (val === 1 ? 0 : 1);115 }116 },117 validateCheckbox: function (useNative, newVal) {118 var self = this, $el = self.$element, isCbx = $el.is(':checkbox');119 if (!isCbx) {120 if (!useNative) {121 $el.trigger('change');122 }123 return;124 }125 self.setCheckboxProp(newVal);126 },127 setCheckboxProp: function (newVal) {128 var self = this, $el = self.$element, isCbx = $el.is(':checkbox');129 if (!isCbx) {130 return;131 }132 $el.prop('indeterminate', false);133 $el.prop('checked', false);134 if (newVal === 1) {135 $el.prop('checked', true);136 } else {137 if (newVal !== 0) {138 $el.prop('indeterminate', true);139 }140 }141 },142 reset: function () {143 var self = this, $el = self.$element;144 $el.val(self.initialValue);145 self.refresh();146 $el.trigger('checkbox.reset');147 },148 refresh: function (options) {149 var self = this;150 if (arguments.length) {151 self.init($.extend(self.options, options));152 }153 else {154 self.disabled = self.$element.attr('disabled') || self.$element.attr('readonly');155 self.init(self.options);156 }157 self.initialValue = self.$element.val();158 },159 getIndicator: function () {160 var self = this,161 options = self.options,162 icon = options.iconUnchecked,163 val = parseInt(self.$element.val());164 if (val === 1) {165 icon = options.iconChecked;166 }167 else {168 if (val !== 0 && self.options.threeState) {169 icon = options.iconNull;170 }171 }172 return icon;173 },174 render: function () {175 var self = this,176 icon = self.getIndicator(),177 size = self.options.size,178 tab = self.disabled ? '' : ' tabindex="1000"',179 css = 'cbx cbx-' + size + (self.disabled ? ' cbx-disabled' : ' cbx-active');180 return '<div class="' + css + '"' + tab + '>' + icon + '</div>';181 }182 };183184 $.fn.checkboxX = function (option) {185 var args = Array.apply(null, arguments);186 args.shift();187 return this.each(function () {188 var $this = $(this),189 data = $this.data('checkboxX'),190 options = typeof option === 'object' && option;191192 if (!data) {193 $this.data('checkboxX',194 (data = new CheckboxX(this, $.extend({}, $.fn.checkboxX.defaults, options, $(this).data()))));195 }196197 if (typeof option === 'string') {198 data[option].apply(data, args);199 }200 });201 };202203 $.fn.checkboxX.defaults = {204 threeState: true,205 inline: true,206 iconChecked: '<i class="glyphicon glyphicon-ok"></i>',207 iconUnchecked: ' ',208 iconNull: '<i class="glyphicon glyphicon-stop"></i>',209 size: 'md',210 enclosedLabel: false,211 useNative: false212 };213214 $.fn.checkboxX.Constructor = CheckboxX;215216 $('input[data-toggle="checkbox-x"]').addClass('cbx-loading');217218 $(document).ready(function () {219 $('input[data-toggle="checkbox-x"]').checkboxX();220 });
...
interpolate_bilinear.js
Source:interpolate_bilinear.js
1/*2 * bilinear: a bilinear interpolator for scalar and vector fields that also handles triangles (3 points).3 */4'use strict'5var µ = require('./micro')6var lookup = require('./lookup')7var glReport = require('./glCheck')8/**9 * @param grid a grid that supports the "closest4" function.10 * @param {Float32Array} data backing data, the same length as the grid.11 * @returns {Function} a bilinear interpolation function f([λ, Ï]) -> v12 */13function scalar (grid, data) {14 var hash = µ.arrayHashCode(data, 1000)15 /**16 * @param {number[]} coord [λ, Ï] in degrees.17 * @returns {number} the bilinear interpolated value or 7e37 if none.18 */19 function bilinear (coord) {20 var indices = grid.closest4(coord)21 var i00 = indices[0]22 if (i00 === i00) {23 var i10 = indices[1]24 var i01 = indices[2]25 var i11 = indices[3]26 var x = indices[4]27 var y = indices[5]28 var rx = 1 - x29 var ry = 1 - y30 var v00 = data[i00]31 var v10 = data[i10]32 var v01 = data[i01]33 var v11 = data[i11]34 if (v00 < 7e37) {35 if (v10 < 7e37 && v01 < 7e37 && v11 < 7e37) {36 var a = rx * ry,37 b = x * ry,38 c = rx * y,39 d = x * y40 return v00 * a + v10 * b + v01 * c + v11 * d // 4 points found.41 } else if (v11 < 7e37 && v10 < 7e37 && x >= y) {42 return v10 + rx * (v00 - v10) + y * (v11 - v10) // 3 points found, triangle interpolate.43 } else if (v01 < 7e37 && v11 < 7e37 && x < y) {44 return v01 + x * (v11 - v01) + ry * (v00 - v01) // 3 points found, triangle interpolate.45 } else if (v01 < 7e37 && v10 < 7e37 && x <= ry) {46 return v00 + x * (v10 - v00) + y * (v01 - v00) // 3 points found, triangle interpolate.47 }48 } else if (v11 < 7e37 && v01 < 7e37 && v10 < 7e37 && x > ry) {49 return v11 + rx * (v01 - v11) + ry * (v10 - v11) // 3 points found, triangle interpolate.50 }51 }52 return 7e3753 }54 /**55 * @param {GLUStick} glu56 */57 bilinear.webgl = function (glu) {58 var gl = glu.context59 var useNative = true // glReport.floatTexLinear && !grid.isCylindrical();60 var look = lookup(glu, grid.dimensions())61 var _grid$dimensions = grid.dimensions(),62 width = _grid$dimensions.width,63 height = _grid$dimensions.height,64 textureSize = [width, height]65 return {66 shaderSource: function shaderSource () {67 return [look.scalarSource(), useNative ? look.shaderSourceTexture2D() : look.shaderSourceBilinearWrap()]68 },69 textures: function textures () {70 // console.log('texture_data scalar', data)71 return {72 weather_data: look.scalarTexture(data, {73 hash: hash,74 TEXTURE_MIN_FILTER: useNative ? gl.LINEAR : gl.NEAREST,75 TEXTURE_MAG_FILTER: useNative ? gl.LINEAR : gl.NEAREST76 })77 }78 },79 uniforms: function uniforms () {80 var result = { u_Data: 'weather_data' }81 if (!useNative) {82 result.u_TextureSize = textureSize83 }84 return result85 }86 }87 }88 return bilinear89}90/**91 * @param grid a grid that supports the "closest4" function.92 * @param {Float32Array|number[]} data backing data in [u0, v0, u1, v1, ...] layout, double the grid size.93 * @returns {Function} a bilinear interpolation function f([λ, Ï]) -> [u, v, m]94 */95function vector (grid, data) {96 var hash = µ.arrayHashCode(data, 1000)97 function triangleInterpolateVector (x, y, u0, v0, u1, v1, u2, v2) {98 var u = u0 + x * (u2 - u0) + y * (u1 - u0)99 var v = v0 + x * (v2 - v0) + y * (v1 - v0)100 return [u, v, Math.sqrt(u * u + v * v)]101 }102 /**103 * @param {number[]} coord [λ, Ï] in degrees.104 * @returns {number[]} the bilinear interpolated value as a vector [u, v, m] or [7e37, 7e37, 7e37] if none.105 */106 function bilinear (coord) {107 var indices = grid.closest4(coord)108 var j00 = indices[0] * 2109 if (j00 === j00) {110 var j10 = indices[1] * 2111 var j01 = indices[2] * 2112 var j11 = indices[3] * 2113 var x = indices[4]114 var y = indices[5]115 var rx = 1 - x116 var ry = 1 - y117 var u00 = data[j00]118 var v00 = data[j00 + 1]119 var u10 = data[j10]120 var v10 = data[j10 + 1]121 var u01 = data[j01]122 var v01 = data[j01 + 1]123 var u11 = data[j11]124 var v11 = data[j11 + 1]125 if (v00 < 7e37) {126 if (v10 < 7e37 && v01 < 7e37 && v11 < 7e37) {127 var a = rx * ry,128 b = x * ry,129 c = rx * y,130 d = x * y131 var u = u00 * a + u10 * b + u01 * c + u11 * d132 var v = v00 * a + v10 * b + v01 * c + v11 * d133 return [u, v, Math.sqrt(u * u + v * v)] // 4 points found.134 } else if (v11 < 7e37 && v10 < 7e37 && x >= y) {135 return triangleInterpolateVector(rx, y, u10, v10, u11, v11, u00, v00)136 } else if (v01 < 7e37 && v11 < 7e37 && x < y) {137 return triangleInterpolateVector(x, ry, u01, v01, u00, v00, u11, v11)138 } else if (v01 < 7e37 && v10 < 7e37 && x <= ry) {139 return triangleInterpolateVector(x, y, u00, v00, u01, v01, u10, v10)140 }141 } else if (v11 < 7e37 && v01 < 7e37 && v10 < 7e37 && x > ry) {142 return triangleInterpolateVector(rx, ry, u11, v11, u10, v10, u01, v01)143 }144 }145 return [7e37, 7e37, 7e37]146 }147 /**148 * @param {GLUStick} glu149 */150 bilinear.webgl = function (glu) {151 var gl = glu.context152 var useNative = glReport.floatTexLinear && !grid.isCylindrical()153 var look = lookup(glu, grid.dimensions())154 var _grid$dimensions2 = grid.dimensions(),155 width = _grid$dimensions2.width,156 height = _grid$dimensions2.height,157 textureSize = [width, height]158 return {159 shaderSource: function shaderSource () {160 return [look.vectorSource(), useNative ? look.shaderSourceTexture2D() : look.shaderSourceBilinearWrap()]161 },162 textures: function textures () {163 console.log('texture_data vector', data)164 return {165 weather_data: look.vectorTexture(data, {166 hash: hash,167 TEXTURE_MIN_FILTER: useNative ? gl.LINEAR : gl.NEAREST,168 TEXTURE_MAG_FILTER: useNative ? gl.LINEAR : gl.NEAREST169 })170 }171 },172 uniforms: function uniforms () {173 var result = { u_Data: 'weather_data' }174 if (!useNative) {175 result.u_TextureSize = textureSize176 }177 return result178 }179 }180 }181 return bilinear182}183module.exports = {184 scalar: scalar,185 vector: vector...
index.js
Source:index.js
1import React from 'react';2import withHooks from './withHooks';3import * as hooks from './ReactHooks';4const useNative = !!React.useState;5export const useState = useNative ? React.useState : hooks.useState;6export const useEffect = useNative ? React.useEffect : hooks.useEffect;7export const useContext = useNative ? React.useContext : hooks.useContext;8export const useReducer = useNative ? React.useReducer : hooks.useReducer;9export const useCallback = useNative ? React.useCallback : hooks.useCallback;10export const useMemo = useNative ? React.useMemo : hooks.useMemo;11export const useRef = useNative ? React.useRef : hooks.useRef;12export const useImperativeHandle = useNative ? React.useImperativeHandle : hooks.useImperativeHandle;13export const useMutationEffect = useNative ? React.useMutationEffect : hooks.useMutationEffect;14export const useLayoutEffect = useNative ? React.useLayoutEffect : hooks.useLayoutEffect;...
Using AI Code Generation
1if (window.__karma__.useNative) {2 window.__karma__.useNative();3}4if (window.__karma__.useIframe) {5 window.__karma__.useIframe();6}7if (window.__karma__.usePolling) {8 window.__karma__.usePolling();9}10if (window.__karma__.useWebSocket) {11 window.__karma__.useWebSocket();12}13module.exports = function(config) {14 config.set({15 client: {16 }17 });18};19module.exports = function(config) {20 config.set({21 client: {22 mocha: {23 }24 },25 preprocessors: {26 },27 browserify: {28 }29 });30};31module.exports = function(config) {32 config.set({33 client: {34 mocha: {35 }36 },37 preprocessors: {38 },39 webpack: {40 module: {41 {42 include: path.resolve('
Using AI Code Generation
1var useNative = require('karma').useNative;2useNative(['mocha', 'chai'], function (mocha, chai) {3});4{5 "dependencies": {6 }7}8var useNative = require('karma').useNative;9useNative(['mocha', 'chai'], function (mocha, chai) {10});
Using AI Code Generation
1module.exports = function(config) {2 config.set({3 preprocessors: {4 },5 })6}7module.exports = function(config) {8 config.set({
Using AI Code Generation
1var native = window.navigator.useNative;2window.navigator.useNative = false;3describe('my test', function() {4 it('should pass', function() {5 expect(true).toBe(true);6 });7});8window.navigator.useNative = native;9module.exports = function(config) {10 config.set({11 });12};13describe('my test', function() {14 it('should pass', function() {15 spyOn(window.navigator, 'useNative').and.returnValue(true);16 expect(window.navigator.useNative).toHaveBeenCalled();17 });18});19describe('my test', function() {20 it('should pass', function() {21 spyOn(window, 'getUserName').and.returnValue('John');22 expect(getUserName()).toBe('John');23 });24});25window.navigator.useNative = native;26module.exports = function(config) {27 config.set({28 });29};
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!