Skip to content

Commit

Permalink
Merge pull request #257 from iLib-js/testcases_myMM
Browse files Browse the repository at this point in the history
Add testcase to verify my-MM (Burmese-Myanmar)
  • Loading branch information
gouniLee authored Sep 2, 2020
2 parents 7d8302c + 3f1f445 commit c7d98fc
Show file tree
Hide file tree
Showing 35 changed files with 3,683 additions and 28 deletions.
3 changes: 2 additions & 1 deletion docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Bug Fixes:
* Updated to IANA time zone data 2020a
* Put base option back on ResBundle
* Fixed a few tools and dependencies so that ilib works on node v14
* Fixed a bug which a default script for ky should be Cyrl instead of Arabic
* Fixed a default timezone in `my-MM` to `Asia/Yangon`
* Fixed a bug which a default script for `ky` should be `Cyrl` instead of `Arabic`

Build 009
-------
Expand Down
4 changes: 2 additions & 2 deletions js/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ limitations under the License.
<property name="nm.bin" value="${build.base}/../node_modules/.bin"/>
<property name="jar.ilib" value="ilib.jar"/>
<property name="locales.default" value="en-AU,en-CA,en-GB,en-IN,en-NG,en-PH,en-PK,en-SG,en-US,en-ZA,de-DE,fr-CA,fr-FR,es-AR,es-ES,es-MX,id-ID,it-IT,ja-JP,ko-KR,pt-BR,ru-RU,tr-TR,vi-VN,zxx-XX,zh-Hans-CN,zh-Hant-HK,zh-Hant-TW,zh-Hans-SG"/>
<property name="locales.unittest" value="aa-DJ,af-NA,agq-CM,ak-GH,am-ET,ar-AE,ar-BH,ar-DJ,ar-DZ,ar-EG,ar-IQ,ar-JO,ar-KW,ar-LB,ar-LY,ar-MA,ar-MR,ar-OM,ar-QA,ar-SA,ar-SD,ar-SY,ar-TN,ar-YE,asa-TZ,as-IN,az-Latn-AZ,bas-CM,be-BY,bem-ZM,bg-BG,bh-IN,bm-ML,bn-IN,br-FR,bs-BS,bs-Cyrl-BA,bs-Latn-BA,bs-ME,ca-FR,cic-US,cop-EG,cs-CZ,da-DK,de-AT,de-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ments" value="/(\!data|\!loadLocaleData|\!defineLocaleData|\!macro|eslint-)/"/>

<!-- =================================================================== -->
Expand Down
36 changes: 18 additions & 18 deletions js/data/locale/my/dateformats.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,31 @@
"h": "h",
"m": "mm",
"s": "ss",
"ah": "B h",
"hm": "B h:mm",
"ah": "a h",
"hm": "a h:mm",
"ms": "mm:ss",
"ahm": "hB h:mm",
"hms": "B h:mm:ss",
"hmz": "z B h:mm",
"ahmz": "z hB h:mm",
"ahms": "hB h:mm:ss",
"hmsz": "z B h:mm:ss",
"ahmsz": "z hB h:mm:ss"
"ahm": "a h:mm",
"hms": "a h:mm:ss",
"hmz": "z a h:mm",
"ahmz": "z a h:mm",
"ahms": "a h:mm:ss",
"hmsz": "z a h:mm:ss",
"ahmsz": "z a h:mm:ss"
},
"24": {
"h": "HH",
"m": "mm",
"s": "ss",
"ah": "HH",
"hm": "B H:mm",
"hm": "H:mm",
"ms": "mm:ss",
"ahm": "B H:mm",
"hms": "B HH:mm:ss",
"hmz": "z B H:mm",
"ahmz": "z B H:mm",
"ahms": "B HH:mm:ss",
"hmsz": "z B HH:mm:ss",
"ahmsz": "z B HH:mm:ss"
"ahm": "H:mm",
"hms": "HH:mm:ss",
"hmz": "z H:mm",
"ahmz": "z H:mm",
"ahms": "HH:mm:ss",
"hmsz": "z HH:mm:ss",
"ahmsz": "z HH:mm:ss"
}
},
"range": {
Expand Down Expand Up @@ -152,4 +152,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion js/data/locale/und/MM/timezone.jf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"timezone": "Asia/Rangoon"}
{"timezone": "Asia/Yangon"}
10 changes: 10 additions & 0 deletions js/test/date/testDayOfWeek.js
Original file line number Diff line number Diff line change
Expand Up @@ -2049,6 +2049,16 @@ module.exports.testweekdata = {
test.equal(info.getWeekEndEnd(), 0);
test.done();
},
testWeekData_my_MM: function(test) {
test.expect(4);
var info = new LocaleInfo("my-MM");
test.ok(info !== null);

test.equal(info.getFirstDayOfWeek(), 0);
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");
Expand Down
10 changes: 10 additions & 0 deletions js/test/date/testMeridiems.js
Original file line number Diff line number Diff line change
Expand Up @@ -2058,6 +2058,16 @@ module.exports.testmeridiems = {
test.equal(fmt[0].name, "पूर्वाह्न");
test.equal(fmt[1].name, "अपराह्न");

test.done();
},
testMeridiem_my_MM: function(test) {
test.expect(3);
var fmt = DateFmt.getMeridiemsRange({locale:"my-MM"});
test.ok(fmt !== null);

test.equal(fmt[0].name, 'နံနက်');
test.equal(fmt[1].name, 'ညနေ');

test.done();
}
}
45 changes: 45 additions & 0 deletions js/test/date/testMonthTranslation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7690,6 +7690,51 @@ module.exports.testmonthtranslation = {
test.equal(value[10], "नोभेम्बर");
test.equal(value[11], "डिसेम्बर");

test.done();
},
testMonthTranslate_my_MM: function(test) {
test.expect(24);

// full, long: MMMM
// medium: MMM
// short: MM

var value = [], i;
var fmt = new DateFmt({locale:"my-MM", 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:"my-MM", 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();
}
}
3 changes: 2 additions & 1 deletion js/test/date/testSuite.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<script src="testdatefmt_mn_Cyrl_MN.js"></script>
<script src="testdatefmt_mr_IN.js"></script>
<script src="testdatefmt_ms_MY.js"></script>
<script src="testdatefmt_my_MM.js"></script>
<script src="testdatefmt_nb_NO.js"></script>
<script src="testdatefmt_ne_NP.js"></script>
<script src="testdatefmt_nl_NL.js"></script>
Expand Down Expand Up @@ -132,4 +133,4 @@ <h1 id="nodeunit-header">date Test Suite</h1>
nodeunit.run(module.exports);
</script>
</body>
</html>
</html>
1 change: 1 addition & 0 deletions js/test/date/testSuiteFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module.exports.files = [
"testdatefmt_mn_Cyrl_MN.js",
"testdatefmt_mr_IN.js",
"testdatefmt_ms_MY.js",
"testdatefmt_my_MM.js",
"testdatefmt_nb_NO.js",
"testdatefmt_ne_NP.js",
"testdatefmt_nl_NL.js",
Expand Down
71 changes: 71 additions & 0 deletions js/test/date/testWeekdayTranslation.js
Original file line number Diff line number Diff line change
Expand Up @@ -11855,6 +11855,77 @@ module.exports.testWeekdayTranslation = {
test.equal(value[5], "शु");
test.equal(value[6], "श");

test.done();
},
testWeekdayTranslationFull_my_MM: function(test) {
// full -> wide
test.expect(7);
var fmt, value = [], i;
fmt = new DateFmt({locale:"my-MM", date:"w", length: "full", useNative:false, timezone:"local"})
for (i=0; i < 7; i++) {
value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, 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.done();
},
testWeekdayTranslationLong_my_MM: function(test) {
// long -> abbreviate
test.expect(7);
var fmt, value = [], i;
fmt = new DateFmt({locale:"my-MM", date:"w", length: "long", useNative:false, timezone:"local"})
for (i=0; i < 7; i++) {
value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, 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.done();
},
testWeekdayTranslationMedium_my_MM: function(test) {
// medium -> short
test.expect(7);
var fmt, value = [], i;
fmt = new DateFmt({locale:"my-MM", date:"w", length: "medium", useNative:false, timezone:"local"})
for (i=0; i < 7; i++) {
value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, 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.done();
},
testWeekdayTranslationShort_my_MM: function(test) {
// short: narrow
test.expect(7);
var fmt, value = [], i;
fmt = new DateFmt({locale:"my-MM", date:"w", length: "short", useNative:false, timezone:"local"})
for (i=0; i < 7; i++) {
value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, 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.done();
}
}
4 changes: 2 additions & 2 deletions js/test/date/testcalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (typeof(LocaleInfo) === "undefined") {

module.exports.testcalendar = {
testDefaultCalendar_GregorianCaseAll: function(test) {
test.expect(202);
test.expect(203);

var localeList = ["ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-MR",
"ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","as-IN","az-Latn-AZ","be-BY","bg-BG","bn-IN","bs-Latn-BA,bs-Latn-ME",
Expand All @@ -34,7 +34,7 @@ module.exports.testcalendar = {
"es-PY","es-SV","es-US","es-UY","es-VE","eu-ES","fi-FI","fr-BE","fr-BF","fr-BJ","fr-CA","fr-CD","fr-CF","fr-CG","fr-CH","fr-CI",
"fr-CM","fr-GQ","fr-DJ","fr-DZ","fr-FR","fr-GA","fr-GN","fr-LB","fr-LU","fr-ML","fr-RW","fr-SN","fr-TG","ga-IE","gl-ES","gu-IN",
"he-IL","hi-IN","hi-SG","hr-HR","hr-ME","hu-HU","hy-AM","id-ID","is-IS","it-CH","it-IT","ja-JP","ka-GE","kk-Cyrl-KZ","km-KH","kn-IN",
"ko-KR","ku-Arab-IQ","ky-KG","lo-LA","lt-LT","lv-LV","mk-MK","ml-IN","mn-Cyrl-MN","mr-IN","ms-MY","ms-SG","nb-NO","ne-NP","nl-BE","nl-NL","pa-IN",
"ko-KR","ku-Arab-IQ","ky-KG","lo-LA","lt-LT","lv-LV","mk-MK","ml-IN","mn-Cyrl-MN","mr-IN","ms-MY","ms-SG","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","pa-IN",
"pa-PK","pl-PL","pt-AO","pt-BR","pt-GQ","pt-CV","pt-PT","ro-RO","ru-BY","ru-GE","ru-KG","ru-KZ","ru-RU","ru-UA","si-LK",
"sk-SK","sl-SI","sq-AL","sq-ME","sr-Latn-ME","sr-Latn-RS","sv-FI","sv-SE","sw-KE","ta-IN","ta-SG","te-IN","tr-AM","tr-AZ",
"tr-CY","tr-TR","uk-UA","ur-IN","ur-PK","uz-Cyrl-UZ","uz-Latn-UZ","vi-VN","zh-Hans-CN","zh-Hans-SG","zh-Hant-HK",
Expand Down
9 changes: 9 additions & 0 deletions js/test/date/testclock.js
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,15 @@ module.exports.testclock = {

test.equal(info.getClock(), 24);

test.done();
},
testClock_my_MM: function(test) {
test.expect(2);
var info = new LocaleInfo("my-MM");
test.ok(info !== null);

test.equal(info.getClock(), 24);

test.done();
}
}
Loading

0 comments on commit c7d98fc

Please sign in to comment.