aboutsummaryrefslogtreecommitdiffstats
path: root/UnitTests/SPStringAdditionsTest.m
diff options
context:
space:
mode:
Diffstat (limited to 'UnitTests/SPStringAdditionsTest.m')
-rw-r--r--UnitTests/SPStringAdditionsTest.m14
1 files changed, 11 insertions, 3 deletions
diff --git a/UnitTests/SPStringAdditionsTest.m b/UnitTests/SPStringAdditionsTest.m
index b0143a0f..0571ff3c 100644
--- a/UnitTests/SPStringAdditionsTest.m
+++ b/UnitTests/SPStringAdditionsTest.m
@@ -25,9 +25,7 @@
#import "SPStringAdditionsTest.h"
#import "SPStringAdditions.h"
-
-static NSString *SPASCIITestString = @"this is a big, crazy test st'ring with som'e random spaces and quot'es";
-static NSString *SPUTFTestString = @"In der Kürze liegt die Würz";
+#import "RegexKitLite.h"
@implementation SPStringAdditionsTest
@@ -36,6 +34,9 @@ static NSString *SPUTFTestString = @"In der Kürze liegt die Würz";
*/
- (void)testStringByRemovingCharactersInSet
{
+ static NSString *SPASCIITestString = @"this is a big, crazy test st'ring with som'e random spaces and quot'es";
+ static NSString *SPUTFTestString = @"In der Kürze liegt die Würz";
+
NSString *charsToRemove = @"abc',ü";
NSCharacterSet *junk = [NSCharacterSet characterSetWithCharactersInString:charsToRemove];
@@ -57,4 +58,11 @@ static NSString *SPUTFTestString = @"In der Kürze liegt die Würz";
charsToRemove);
}
+- (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);
+}
+
@end