//==== PRIORITY P1
//==== TEST_CRITERIA MNA MR
test(function () {
- assert_equals(date.toLocaleString(), "Friday, November 11, 2011 at 4:55:54 AM", this.name);
+ icu_ver = getLibicuVersion();
+ if(icu_ver < NEWVERSION_ICU) {
+ assert_equals(date.toLocaleString(), "Friday, November 11, 2011, 4:55:54 AM", this.name);
+ } else {
+ assert_equals(date.toLocaleString(), "Friday, November 11, 2011 at 4:55:54 AM", this.name);
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MNA MR
test(function () {
- assert_regexp_match(date.toString(), /Friday, November 11, 2011 at 4:55:54 AM GMT\+0900 South Korea Time/, this.name);
+ icu_ver = getLibicuVersion();
+ if(icu_ver < NEWVERSION_ICU) {
+ assert_regexp_match(date.toTimeString(), /0?4:55:54( AM)? GMT\+0900 South Korea Time/, this.name);
+ } else {
+ assert_regexp_match(date.toString(), /Friday, November 11, 2011 at 4:55:54 AM GMT\+0900 South Korea Time/, this.name);
+ }
}, document.title);
</script>
//==== PRIORITY P1
//==== TEST_CRITERIA MNA MR
test(function () {
- assert_regexp_match(date.toTimeString(), /4:55:54 AM GMT\+0900 South Korea Time/, this.name);
+ icu_ver = getLibicuVersion();
+ if(icu_ver < NEWVERSION_ICU) {
+ assert_regexp_match(date.toTimeString(), /0?4:55:54( AM)? GMT\+0900 South Korea Time/, this.name);
+ } else {
+ assert_regexp_match(date.toTimeString(), /4:55:54 AM GMT\+0900 South Korea Time/, this.name);
+ }
}, document.title);
</script>
var returnedValue;
returnedValue = tizen.time.getTimeFormat();
assert_type(returnedValue, "string", "Time format type");
- assert_equals(returnedValue, "h:m:s ap", "Time format");
+ icu_ver = getLibicuVersion();
+ if(icu_ver < NEWVERSION_ICU) {
+ assert_equals(returnedValue, "h:m:s ap", "Time format");
+ } else {
+ assert_equals(returnedValue, "h:m:s ap", "Time format");
+ }
}, document.title);
</script>
var DATE_FORMAT = "D, d M y"; // this variable MUST be set before executing tests
var TIME_FORMAT = "h:m:s ap"; // this variable MUST be set before executing tests
+var NEWVERSION_ICU = 72.1;
+
+function getLibicuVersion() {
+ var toSend = {'cmd' : "rpm -qa |grep icu"};
+ var response = $.ajax({
+ type: "POST",
+ url: 'http://127.0.0.1:8000/execute_command',
+ async: false,
+ dataType: 'json',
+ data: toSend
+ });
+ //This log provides console output after executing shell command.
+ console.log(JSON.stringify(response));
+ str = JSON.stringify(response)
+ console.log(JSON.stringify(response));
+ const pattern = /-(\d+\.\d+)-/;
+ const result = str.match(pattern);
+
+ if (result) {
+ console.log(result[1]);// 输出 70.1
+ } else {
+ assert_unreached("No match found.");
+ }
+ return parseFloat(result[1])
+}
// change date and time format
document.write('<script src="../webrunner/jquery-1.10.2.min.js"></script>');