From 9639e72280618899f407446a8a11ed5a67eba57a Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Tue, 25 Aug 2020 18:43:10 +0900 Subject: [PATCH 1/3] Add testcase to verify lo-LA --- js/build.xml | 4 +- js/test/date/testDayOfWeek.js | 10 + js/test/date/testMeridiems.js | 10 + js/test/date/testMonthTranslation.js | 45 + js/test/date/testSuite.html | 3 +- js/test/date/testSuiteFiles.js | 1 + js/test/date/testWeekdayTranslation.js | 71 + js/test/date/testcalendar.js | 4 +- js/test/date/testclock.js | 9 + js/test/date/testdatefmt_lo_LA.js | 1787 +++++++++++++++++ js/test/date/testdatetimefmt.js | 26 + .../daterange/testdatefmtrange_fmttemplate.js | 72 + js/test/number/testcurrency.js | 11 +- js/test/number/testnumfmt2.js | 19 + js/test/root/testlocaleinfo.js | 10 + js/test/root/testlocalematch.js | 46 + js/test/root/testscriptinfo.js | 10 + js/test/strings-ext/testSuite.html | 3 +- js/test/strings-ext/testSuiteFiles.js | 3 +- js/test/strings-ext/testlistfmt_lo_LA.js | 253 +++ 20 files changed, 2389 insertions(+), 8 deletions(-) create mode 100644 js/test/date/testdatefmt_lo_LA.js create mode 100644 js/test/strings-ext/testlistfmt_lo_LA.js diff --git a/js/build.xml b/js/build.xml index 940a8bfce9..7f1c353c42 100644 --- a/js/build.xml +++ b/js/build.xml @@ -53,8 +53,8 @@ limitations under the License. - - + + diff --git a/js/test/date/testDayOfWeek.js b/js/test/date/testDayOfWeek.js index 0aa7c5b75a..3430bc9f87 100644 --- a/js/test/date/testDayOfWeek.js +++ b/js/test/date/testDayOfWeek.js @@ -1968,5 +1968,15 @@ module.exports.testweekdata = { test.equal(info.getWeekEndStart(), 6); test.equal(info.getWeekEndEnd(), 0); test.done(); + }, + testWeekData_lo_LA: function(test) { + test.expect(4); + var info = new LocaleInfo("lo-LA"); + test.ok(info !== null); + + test.equal(info.getFirstDayOfWeek(), 0); + test.equal(info.getWeekEndStart(), 6); + test.equal(info.getWeekEndEnd(), 0); + test.done(); } } diff --git a/js/test/date/testMeridiems.js b/js/test/date/testMeridiems.js index 44fb518658..4ed3e19aa3 100644 --- a/js/test/date/testMeridiems.js +++ b/js/test/date/testMeridiems.js @@ -1972,6 +1972,16 @@ module.exports.testmeridiems = { test.equal(fmt[0].name, "AM"); test.equal(fmt[1].name, "PM"); + test.done(); + }, + testMeridiem_lo_LA: function(test) { + test.expect(3); + var fmt = DateFmt.getMeridiemsRange({locale:"lo-LA"}); + test.ok(fmt !== null); + + test.equal(fmt[0].name, "ກ່ອນທ່ຽງ"); + test.equal(fmt[1].name, "ຫຼັງທ່ຽງ"); + test.done(); } } \ No newline at end of file diff --git a/js/test/date/testMonthTranslation.js b/js/test/date/testMonthTranslation.js index d468675dc9..55304fbdb8 100644 --- a/js/test/date/testMonthTranslation.js +++ b/js/test/date/testMonthTranslation.js @@ -7315,6 +7315,51 @@ module.exports.testmonthtranslation = { test.equal(value[10], "ნოე"); test.equal(value[11], "დეკ"); + test.done(); + }, + testMonthTranslate_lo_LA: function(test) { + test.expect(24); + + // full, long: MMMM + // medium: MMM + // short: MM + + var value = [], i; + var fmt = new DateFmt({locale:"lo-LA", date:"m", length: "full", useNative:false, timezone:"local"}) + for (i=0; i < 12; i++) { + value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"})); + } + test.equal(value[0], "ມັງກອນ"); + test.equal(value[1], "ກຸມພາ"); + test.equal(value[2], "ມີນາ"); + test.equal(value[3], "ເມສາ"); + test.equal(value[4], "ພຶດສະພາ"); + test.equal(value[5], "ມິຖຸນາ"); + test.equal(value[6], "ກໍລະກົດ"); + test.equal(value[7], "ສິງຫາ"); + test.equal(value[8], "ກັນຍາ"); + test.equal(value[9], "ຕຸລາ"); + test.equal(value[10], "ພະຈິກ"); + test.equal(value[11], "ທັນວາ"); + + var fmt = new DateFmt({locale:"lo-LA", date:"m", length: "medium", useNative:false, timezone:"local"}) + for (i=0; i < 12; i++) { + value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"})); + } + + test.equal(value[0], "ມ.ກ."); + test.equal(value[1], "ກ.ພ."); + test.equal(value[2], "ມ.ນ."); + test.equal(value[3], "ມ.ສ."); + test.equal(value[4], "ພ.ພ."); + test.equal(value[5], "ມິ.ຖ."); + test.equal(value[6], "ກ.ລ."); + test.equal(value[7], "ສ.ຫ."); + test.equal(value[8], "ກ.ຍ."); + test.equal(value[9], "ຕ.ລ."); + test.equal(value[10], "ພ.ຈ."); + test.equal(value[11], "ທ.ວ."); + test.done(); } } diff --git a/js/test/date/testSuite.html b/js/test/date/testSuite.html index 98d7e4a687..f76d137f83 100644 --- a/js/test/date/testSuite.html +++ b/js/test/date/testSuite.html @@ -1,7 +1,7 @@