diff options
author | Michael Jaumann <meta_dev@yahoo.com> | 2014-09-09 08:58:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-09 15:53:10 +0000 |
commit | a1d51bf9aa9742eede83ae016360381c5c0eeeee (patch) | |
tree | 7f1cd9f87a27981a6cdda30a09f67238347914ed /unotools | |
parent | 9e773854c8cd24e526a6beed6bee74313a7fd47b (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/qa/unit/testGetEnlishSearchName.cxx | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/unotools/qa/unit/testGetEnlishSearchName.cxx b/unotools/qa/unit/testGetEnlishSearchName.cxx index 1701215987a0..06ffcef06558 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(); |