[Libreoffice-commits] core.git: svl/qa

Laurent Balland-Poirier laurent.balland-poirier at laposte.net
Tue Aug 9 13:56:33 UTC 2016


 svl/qa/unit/svl.cxx |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit 284c8ce11957f11693e6b5026adc1a564d35e7e9
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Sun Jul 24 23:30:46 2016 +0200

    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 at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 44878d8..8fb241a 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";


More information about the Libreoffice-commits mailing list