tdf#101096 tdf#101147 Add qa tests for minute/month detection
Test number formats of bug reports Test odd date formats which do not follow Excel detection Change-Id: Iaa6d25a0103cae5e3ddd76075a324240aa255c35 Reviewed-on: https://gerrit.libreoffice.org/27494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
parent
7b355ad06e
commit
284c8ce119
@ -1131,11 +1131,27 @@ void Test::testUserDefinedNumberFormats()
|
||||
sExpected = "-12.00 ;";
|
||||
checkPreviewString(aFormatter, sCode, -12.0, eLang, sExpected);
|
||||
}
|
||||
{ // tdf#995339: detect SSMM as second minute
|
||||
sCode = "SS:MM:HH DD/MM/YY"; // Month not detected by Excel, but we do not follow that.
|
||||
{ // tdf#95339: detect SSMM as second minute
|
||||
sCode = "SS:MM:HH DD/MM/YY"; // Month not detected by Excel, but we do not follow that.
|
||||
sExpected = "54:23:03 02/01/00";
|
||||
checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
|
||||
}
|
||||
{ // tdf#101147: detect SSMM as second month
|
||||
sCode = "HH:MM:SS MM/DD";
|
||||
sExpected = "03:23:54 01/02";
|
||||
checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
|
||||
}
|
||||
{ // tdf#101096: different detection of month/minute with Excel
|
||||
sCode = "HH DD MM"; // month detectected because of previous DD
|
||||
sExpected = "03 02 01";
|
||||
checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
|
||||
sCode = "HH:MM HH DD/MM"; // month detected because of previous DD
|
||||
sExpected = "03:23 03 02/01";
|
||||
checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
|
||||
sCode = "SS:DD-MM-YY SS:MM"; // 1st is month, because of previous DD; 2nd is minute as SS has not minute
|
||||
sExpected = "54:02-01-00 54:23";
|
||||
checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
|
||||
}
|
||||
{ // tdf#99996: better algorithm for fraction representation
|
||||
sCode = "# ?/???";
|
||||
sExpected = "-575 540/697";
|
||||
|
Loading…
x
Reference in New Issue
Block a user