Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reindent tests from spaces to tabs

  • Loading branch information...
commit 94a217bf9bdbde2754d3ea647ab781a1bd8a4135 1 parent cc0ed03
@griff griff authored
Showing with 33 additions and 33 deletions.
  1. +33 −33 framework/tests/OnigRegexpTest.m
View
66 framework/tests/OnigRegexpTest.m
@@ -102,21 +102,21 @@ - (void)testSplit
- (NSString *)succReplace:(OnigResult *)res
{
- unichar ch[2];
- ch[0] = [[res body] characterAtIndex:0] + 1;
- ch[1] = ' ';
- return [NSString stringWithCharacters:ch length:2];
+ unichar ch[2];
+ ch[0] = [[res body] characterAtIndex:0] + 1;
+ ch[1] = ' ';
+ return [NSString stringWithCharacters:ch length:2];
}
- (NSString *)describeReplace:(OnigResult *)res
{
- NSString* body = [res body];
- return [NSString stringWithFormat:@"%@[%@]", [body class], body];
+ NSString* body = [res body];
+ return [NSString stringWithFormat:@"%@[%@]", [body class], body];
}
- (NSString *)xReplace:(OnigResult *)res
{
- return @"x";
+ return @"x";
}
- (void)testReplace
@@ -134,21 +134,21 @@ - (void)testReplace
#if defined(NS_BLOCKS_AVAILABLE)
STAssertEqualObjects([@"hello" replaceByRegexp:@"." withBlock:^(OnigResult* res) {
- unichar ch[2];
- ch[0] = [[res body] characterAtIndex:0] + 1;
- ch[1] = ' ';
- return (NSString *)[NSString stringWithCharacters:ch length:2];
- }], @"i ello", nil);
-
- NSString* actual = [@"hello!" replaceByRegexp:@"(.)(.)" withBlock:^(OnigResult* res) {
- NSString* body = [res body];
- return (NSString *)[NSString stringWithFormat:@"%@[%@]", [body class], body];
- }];
+ unichar ch[2];
+ ch[0] = [[res body] characterAtIndex:0] + 1;
+ ch[1] = ' ';
+ return (NSString *)[NSString stringWithCharacters:ch length:2];
+ }], @"i ello", nil);
+
+ NSString* actual = [@"hello!" replaceByRegexp:@"(.)(.)" withBlock:^(OnigResult* res) {
+ NSString* body = [res body];
+ return (NSString *)[NSString stringWithFormat:@"%@[%@]", [body class], body];
+ }];
STAssertEqualObjects(actual, @"NSCFString[he]llo!", nil);
-
+
STAssertEqualObjects([@"hello" replaceByRegexp:@"l" withBlock:^(OnigResult* res) {
- return @"x";
- }], @"hexlo", nil);
+ return @"x";
+ }], @"hexlo", nil);
#endif
}
@@ -166,21 +166,21 @@ - (void)testReplaceAll
#if defined(NS_BLOCKS_AVAILABLE)
STAssertEqualObjects([@"hello" replaceAllByRegexp:@"." withBlock:^(OnigResult* res) {
- unichar ch[2];
- ch[0] = [[res body] characterAtIndex:0] + 1;
- ch[1] = ' ';
- return (NSString *)[NSString stringWithCharacters:ch length:2];
- }], @"i f m m p ", nil);
-
- NSString* actual = [@"hello!" replaceAllByRegexp:@"(.)(.)" withBlock:^(OnigResult* res) {
- NSString* body = [res body];
- return (NSString *)[NSString stringWithFormat:@"%@[%@]", [body class], body];
- }];
+ unichar ch[2];
+ ch[0] = [[res body] characterAtIndex:0] + 1;
+ ch[1] = ' ';
+ return (NSString *)[NSString stringWithCharacters:ch length:2];
+ }], @"i f m m p ", nil);
+
+ NSString* actual = [@"hello!" replaceAllByRegexp:@"(.)(.)" withBlock:^(OnigResult* res) {
+ NSString* body = [res body];
+ return (NSString *)[NSString stringWithFormat:@"%@[%@]", [body class], body];
+ }];
STAssertEqualObjects(actual, @"NSCFString[he]NSCFString[ll]NSCFString[o!]", nil);
-
+
STAssertEqualObjects([@"hello" replaceAllByRegexp:@"l" withBlock:^(OnigResult* res) {
- return @"x";
- }], @"hexxo", nil);
+ return @"x";
+ }], @"hexxo", nil);
#endif
}
Please sign in to comment.
Something went wrong with that request. Please try again.