From 5a6a66de481bd1f3ccae678e718417fff9f27675 Mon Sep 17 00:00:00 2001 From: Goun Lee Date: Thu, 27 Aug 2020 17:48:51 +0900 Subject: [PATCH] Add testcases to verify ne-NP --- js/build.xml | 2 +- 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_ne_NP.js | 1796 +++++++++++++++++ js/test/date/testdatetimefmt.js | 26 + js/test/daterange/testSuite.html | 3 +- js/test/daterange/testSuiteFiles.js | 3 +- .../daterange/testdatefmtrange_fmttemplate.js | 72 + js/test/daterange/testdatefmtrange_ne_NP.js | 692 +++++++ js/test/durfmt/testdurfmt2.js | 41 + js/test/number/testcurrency.js | 11 +- js/test/number/testnumfmt.js | 90 +- js/test/number/testnumfmt2.js | 19 + js/test/root/testcountry.js | 26 + js/test/root/testlocaleinfo.js | 10 + js/test/root/testlocalematch.js | 56 + js/test/root/testscriptinfo.js | 10 + js/test/root/teststrings.js | 40 + js/test/strings-ext/testSuite.html | 3 +- js/test/strings-ext/testSuiteCompiled.html | 3 +- js/test/strings-ext/testSuiteFiles.js | 3 +- js/test/strings-ext/testlistfmt_ne_NP.js | 253 +++ js/test/units/testSuite.html | 3 +- js/test/units/testSuiteFiles.js | 3 +- js/test/units/testunitfmt_ne_NP.js | 327 +++ 31 files changed, 3632 insertions(+), 13 deletions(-) create mode 100644 js/test/date/testdatefmt_ne_NP.js create mode 100644 js/test/daterange/testdatefmtrange_ne_NP.js create mode 100644 js/test/strings-ext/testlistfmt_ne_NP.js create mode 100644 js/test/units/testunitfmt_ne_NP.js diff --git a/js/build.xml b/js/build.xml index 616ffcdb9b..eaf5bf3b8e 100644 --- a/js/build.xml +++ b/js/build.xml @@ -54,7 +54,7 @@ limitations under the License. - + diff --git a/js/test/date/testDayOfWeek.js b/js/test/date/testDayOfWeek.js index 5879a6faa0..ae4dd39cd9 100644 --- a/js/test/date/testDayOfWeek.js +++ b/js/test/date/testDayOfWeek.js @@ -1978,5 +1978,15 @@ module.exports.testweekdata = { test.equal(info.getWeekEndStart(), 6); test.equal(info.getWeekEndEnd(), 0); test.done(); + }, + testWeekData_ne_NP: function(test) { + test.expect(4); + var info = new LocaleInfo("ne-NP"); + 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 35d6740376..2575b1707b 100644 --- a/js/test/date/testMeridiems.js +++ b/js/test/date/testMeridiems.js @@ -1982,6 +1982,16 @@ module.exports.testmeridiems = { test.equal(fmt[0].name, "AM"); test.equal(fmt[1].name, "PM"); + test.done(); + }, + testMeridiem_ne_NP: function(test) { + test.expect(3); + var fmt = DateFmt.getMeridiemsRange({locale:"ne-NP"}); + 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 a2f0368a44..faf91dc09d 100644 --- a/js/test/date/testMonthTranslation.js +++ b/js/test/date/testMonthTranslation.js @@ -7360,6 +7360,51 @@ module.exports.testmonthtranslation = { test.equal(value[10], "aza."); test.equal(value[11], "abe."); + test.done(); + }, + testMonthTranslate_ne_NP: function(test) { + test.expect(24); + + // full, long: MMMM + // medium: MMM + // short: M + + var value = [], i; + var fmt = new DateFmt({locale:"ne-NP", 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:"ne-NP", 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 00c43149e6..c3d1af5024 100644 --- a/js/test/date/testSuite.html +++ b/js/test/date/testSuite.html @@ -1,7 +1,7 @@