From 0f889323c867f69e2a70a91b2f376fcd05bb481e Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sat, 23 Mar 2013 22:41:26 -0400 Subject: [PATCH] Revert "Add some testing for calculating the title.profile file name" This builds fine on my Mac but not my Linux machine - what a pain This reverts commit ef949e963bc7c836ea7c9ac25988b194d6dd11e0. --- src/tests/ProfileTest.cpp | 40 --------------------------------------- src/tests/ProfileTest.h | 1 - 2 files changed, 41 deletions(-) diff --git a/src/tests/ProfileTest.cpp b/src/tests/ProfileTest.cpp index 7681de141..55f72352a 100644 --- a/src/tests/ProfileTest.cpp +++ b/src/tests/ProfileTest.cpp @@ -25,7 +25,6 @@ // Konsole #include "../Profile.h" -#include "../ProfileWriter.h" using namespace Konsole; @@ -171,45 +170,6 @@ void ProfileTest::testProfileGroup() QVERIFY(profile[0]->property(Profile::Command) != "fish"); } -// Verify the correct file name is created from the untranslatedname -void ProfileTest::testProfileFileNames() -{ - Profile::Ptr profile = Profile::Ptr(new Profile); - QFileInfo fileInfo; - ProfileWriter* writer = new KDE4ProfileWriter; - - profile->setProperty(Profile::UntranslatedName, "Indiana"); - fileInfo.setFile(writer->getPath(profile)); - QCOMPARE(fileInfo.fileName(), QString("Indiana.profile")); - - profile->setProperty(Profile::UntranslatedName, "Old Paris"); - fileInfo.setFile(writer->getPath(profile)); - QCOMPARE(fileInfo.fileName(), QString("Old Paris.profile")); - - // FIXME: deal w/ file systems that are case-insensitive - // This leads to confusion as both Test and test can appear in the Manager - // Profile dialog while really there is only 1 test.profile file. - // Suggestions: all lowercase, testing the file system, ... - /* - profile->setProperty(Profile::UntranslatedName, "New Profile"); - fileInfo.setFile(writer->getPath(profile)); - QCOMPARE(fileInfo.fileName(), QString("new profile.profile")); - */ - - // FIXME: don't allow certain characters in file names - // Consider: ,^@=+{}[]~!?:&*\"|#%<>$\"'();`'/\ - // Suggestions: changing them all to _, just remove them, ... - // Bug 315086 comes from an user using / in the profile name - multiple - // issues there. - /* - profile->setProperty(Profile::UntranslatedName, "new/profile"); - fileInfo.setFile(writer->getPath(profile)); - QCOMPARE(fileInfo.fileName(), QString("new_profile.profile")); - */ - - delete writer; -} - QTEST_KDEMAIN_CORE(ProfileTest) #include "ProfileTest.moc" diff --git a/src/tests/ProfileTest.h b/src/tests/ProfileTest.h index ccc25bdd9..a6b48ab64 100644 --- a/src/tests/ProfileTest.h +++ b/src/tests/ProfileTest.h @@ -33,7 +33,6 @@ private slots: void testProfile(); void testClone(); void testProfileGroup(); - void testProfileFileNames(); }; }