diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2016-07-24 23:30:46 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-08-09 13:55:34 +0000 |
commit | 284c8ce11957f11693e6b5026adc1a564d35e7e9 (patch) | |
tree | 920f816d3636ee1db21738c8f596fdbd67ae19a6 | |
parent | Resolves: tdf#101382 turn SetMailMergeConfigItem into a shared_ptr (diff) | |
download | core-284c8ce11957f11693e6b5026adc1a564d35e7e9.tar.gz core-284c8ce11957f11693e6b5026adc1a564d35e7e9.zip |
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>
-rw-r--r-- | svl/qa/unit/svl.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 44878d8565d2..8fb241a940d5 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -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"; |