aboutsummaryrefslogtreecommitdiffstats
path: root/UnitTests/SPStringAdditionsTest.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-08 14:40:57 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-08 14:40:57 +0000
commit7bead0b2fc2dc203157988460c4c0a2abd5857a2 (patch)
tree10bb64793faebcc649f74bd9cc21bef6838c4b3b /UnitTests/SPStringAdditionsTest.m
parent343e4ed439ba0ccc255460df4fc69e25c4a3f91e (diff)
downloadsequelpro-7bead0b2fc2dc203157988460c4c0a2abd5857a2.tar.gz
sequelpro-7bead0b2fc2dc203157988460c4c0a2abd5857a2.tar.bz2
sequelpro-7bead0b2fc2dc203157988460c4c0a2abd5857a2.zip
Rename test files.
Diffstat (limited to 'UnitTests/SPStringAdditionsTest.m')
-rw-r--r--UnitTests/SPStringAdditionsTest.m84
1 files changed, 0 insertions, 84 deletions
diff --git a/UnitTests/SPStringAdditionsTest.m b/UnitTests/SPStringAdditionsTest.m
deleted file mode 100644
index 2d0cb0fb..00000000
--- a/UnitTests/SPStringAdditionsTest.m
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// $Id$
-//
-// SPStringAdditionsTest.m
-// sequel-pro
-//
-// Created by J Knight on 17/05/09.
-// Copyright 2009 J Knight. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// More info at <http://code.google.com/p/sequel-pro/>
-
-#import "SPStringAdditionsTest.h"
-#import "SPStringAdditions.h"
-#import "RegexKitLite.h"
-
-@implementation SPStringAdditionsTest
-
-/**
- * stringByRemovingCharactersInSet test case.
- */
-- (void)testStringByRemovingCharactersInSet
-{
- NSString *SPASCIITestString = @"this is a big, crazy test st'ring with som'e random spaces and quot'es";
- NSString *SPUTFTestString = @"In der Kürze liegt die Würz";
-
- NSString *charsToRemove = @"abc',ü";
-
- NSCharacterSet *junk = [NSCharacterSet characterSetWithCharactersInString:charsToRemove];
-
- NSString *actualUTFString = SPUTFTestString;
- NSString *actualASCIIString = SPASCIITestString;
-
- NSString *expectedUTFString = @"In der Krze liegt die Wrz";
- NSString *expectedASCIIString = @"this is ig rzy test string with some rndom spes nd quotes";
-
- STAssertEqualObjects([actualASCIIString stringByRemovingCharactersInSet:junk],
- expectedASCIIString,
- @"The following characters should have been removed %@",
- charsToRemove);
-
- STAssertEqualObjects([actualUTFString stringByRemovingCharactersInSet:junk],
- expectedUTFString,
- @"The following characters should have been removed %@",
- charsToRemove);
-}
-
-/**
- * stringWithNewUUID test case.
- */
-- (void)testStringWithNewUUID
-{
- NSString *uuid = [NSString stringWithNewUUID];
-
- STAssertTrue([uuid isMatchedByRegex:@"[A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12}"], @"UUID %@ doesn't match regex", uuid);
-}
-
-/**
- * createViewSyntaxPrettifier test case.
- */
-- (void)testCreateViewSyntaxPrettifier
-{
- NSString *originalSyntax = @"CREATE VIEW `test_view` AS select `test_table`.`id` AS `id` from `test_table`;";
- NSString *expectedSyntax = @"CREATE VIEW `test_view`\nAS SELECT\n `test_table`.`id` AS `id`\nFROM `test_table`;";
-
- NSString *actualSyntax = [originalSyntax createViewSyntaxPrettifier];
-
- STAssertEqualObjects([actualSyntax description], [expectedSyntax description], @"Actual view syntax '%@' does not equal expected syntax '%@'", actualSyntax, expectedSyntax);
-}
-
-@end