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

Michael Jaumann meta_dev at yahoo.com
Tue Sep 9 08:53:35 PDT 2014


 unotools/qa/unit/testGetEnlishSearchName.cxx |   29 +++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

New commits:
commit a1d51bf9aa9742eede83ae016360381c5c0eeeee
Author: Michael Jaumann <meta_dev at yahoo.com>
Date:   Tue Sep 9 08:58:52 2014 +0000

    fdo#82854 extended unit-tests
    
    Conflicts:
    	unotools/qa/unit/testGetEnlishSearchName.cxx
    
    Change-Id: Ie721cbc275998b37a4f6206079d55734b85308b0
    Reviewed-on: https://gerrit.libreoffice.org/11348
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/unotools/qa/unit/testGetEnlishSearchName.cxx b/unotools/qa/unit/testGetEnlishSearchName.cxx
index 1701215..06ffcef 100644
--- a/unotools/qa/unit/testGetEnlishSearchName.cxx
+++ b/unotools/qa/unit/testGetEnlishSearchName.cxx
@@ -28,27 +28,36 @@ public:
 };
 
 void Test::setUp()
-{};
+{
+}
 
 void Test::testSingleElement()
 {
     {   // lowercase
         OUString test1 = GetEnglishSearchFontName( "SYMBOL" );
-        CPPUNIT_ASSERT_EQUAL(test1, OUString("symbol"));
-        // trailingWhitespaces
+        CPPUNIT_ASSERT_EQUAL( OUString("symbol"),test1);
+        //trailingWhitespaces
         test1 = GetEnglishSearchFontName( "Symbol    " );
-        CPPUNIT_ASSERT_EQUAL(test1, OUString("symbol"));
-        // removing Skripts
+        CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1);
+        //removing Skripts
         test1 = GetEnglishSearchFontName( "Symbol(skript)" );
-        CPPUNIT_ASSERT_EQUAL(test1, OUString("symbol"));
-        // remove Whitespaces between
+        CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1);
+        //remove Whitespaces between
         test1 = GetEnglishSearchFontName( "Symbol (skript)" );
-        CPPUNIT_ASSERT_EQUAL(test1, OUString("symbol"));
-        // trailingWhitespaces
+        CPPUNIT_ASSERT_EQUAL( OUString("symbol"),test1);
+        //remove special characters; leave semicolon, numbers
+        test1 = GetEnglishSearchFontName( "sy;mb?=ol129" );
+        CPPUNIT_ASSERT_EQUAL( OUString("sy;mbol129"),test1);
+
+        //transformation
+
+        sal_Unicode const transfor[] ={ 0x30D2, 0x30E9, 0x30AE, 0x30CE, 0x4E38, 0x30B4, 'p','r','o','n',0};
+
+        test1 = GetEnglishSearchFontName(transfor );
+        CPPUNIT_ASSERT_EQUAL( OUString("hiraginomarugothicpron"),test1);
     }
 }
 
-
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 CPPUNIT_PLUGIN_IMPLEMENT();
 


More information about the Libreoffice-commits mailing list