From 23cebb364b6fd57debd31a86975a6ae6f119dd99 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Tue, 21 Oct 2014 20:22:41 +1100 Subject: unotools: correct filename spelling - testGetEnglishSearchName.cxx Change-Id: I9d8bc0b8d9257e8bd2453a0707081c134cc775c3 --- unotools/CppunitTest_unotools_fontdefs.mk | 2 +- unotools/qa/unit/testGetEnglishSearchName.cxx | 64 +++++++++++++++++++++++++++ unotools/qa/unit/testGetEnlishSearchName.cxx | 64 --------------------------- 3 files changed, 65 insertions(+), 65 deletions(-) create mode 100644 unotools/qa/unit/testGetEnglishSearchName.cxx delete mode 100644 unotools/qa/unit/testGetEnlishSearchName.cxx diff --git a/unotools/CppunitTest_unotools_fontdefs.mk b/unotools/CppunitTest_unotools_fontdefs.mk index 468838b1298d..c96385c22fb8 100644 --- a/unotools/CppunitTest_unotools_fontdefs.mk +++ b/unotools/CppunitTest_unotools_fontdefs.mk @@ -17,7 +17,7 @@ $(eval $(call gb_CppunitTest_use_api,unotools_fontdefs, \ )) $(eval $(call gb_CppunitTest_add_exception_objects,unotools_fontdefs, \ - unotools/qa/unit/testGetEnlishSearchName \ + unotools/qa/unit/testGetEnglishSearchName \ )) $(eval $(call gb_CppunitTest_use_libraries,unotools_fontdefs, \ diff --git a/unotools/qa/unit/testGetEnglishSearchName.cxx b/unotools/qa/unit/testGetEnglishSearchName.cxx new file mode 100644 index 000000000000..dbc8b173a9f1 --- /dev/null +++ b/unotools/qa/unit/testGetEnglishSearchName.cxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#include "cppunit/TestCase.h" +#include "cppunit/TestFixture.h" +#include "cppunit/TestSuite.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" +#include + +class Test: public CppUnit::TestFixture +{ +public: + virtual void setUp() SAL_OVERRIDE; + void testSingleElement(); + + CPPUNIT_TEST_SUITE(Test); + CPPUNIT_TEST(testSingleElement); + + CPPUNIT_TEST_SUITE_END(); +}; + +void Test::setUp() +{ +} + +void Test::testSingleElement() +{ + { // lowercase + OUString test1 = GetEnglishSearchFontName( "SYMBOL" ); + CPPUNIT_ASSERT_EQUAL( OUString("symbol"),test1); + //trailingWhitespaces + test1 = GetEnglishSearchFontName( "Symbol " ); + CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1); + //removing Skripts + test1 = GetEnglishSearchFontName( "Symbol(SIP)" ); + CPPUNIT_ASSERT_EQUAL(OUString("symbol(sip)"),test1); + //remove Whitespaces between + test1 = GetEnglishSearchFontName( "Symbol (thai)" ); + 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(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/qa/unit/testGetEnlishSearchName.cxx b/unotools/qa/unit/testGetEnlishSearchName.cxx deleted file mode 100644 index dbc8b173a9f1..000000000000 --- a/unotools/qa/unit/testGetEnlishSearchName.cxx +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - */ - -#include "cppunit/TestCase.h" -#include "cppunit/TestFixture.h" -#include "cppunit/TestSuite.h" -#include "cppunit/extensions/HelperMacros.h" -#include "cppunit/plugin/TestPlugIn.h" -#include - -class Test: public CppUnit::TestFixture -{ -public: - virtual void setUp() SAL_OVERRIDE; - void testSingleElement(); - - CPPUNIT_TEST_SUITE(Test); - CPPUNIT_TEST(testSingleElement); - - CPPUNIT_TEST_SUITE_END(); -}; - -void Test::setUp() -{ -} - -void Test::testSingleElement() -{ - { // lowercase - OUString test1 = GetEnglishSearchFontName( "SYMBOL" ); - CPPUNIT_ASSERT_EQUAL( OUString("symbol"),test1); - //trailingWhitespaces - test1 = GetEnglishSearchFontName( "Symbol " ); - CPPUNIT_ASSERT_EQUAL(OUString("symbol"),test1); - //removing Skripts - test1 = GetEnglishSearchFontName( "Symbol(SIP)" ); - CPPUNIT_ASSERT_EQUAL(OUString("symbol(sip)"),test1); - //remove Whitespaces between - test1 = GetEnglishSearchFontName( "Symbol (thai)" ); - 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(); - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3