mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33681 72102866-910b-0410-8b05-ffd578937521
17 lines
603 B
Objective-C
17 lines
603 B
Objective-C
#import <Foundation/NSString.h>
|
|
#import "ObjectTesting.h"
|
|
|
|
int main(void)
|
|
{
|
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
|
NSString *regex = @"abcd*";
|
|
NSString *source = @"abcdddddd e f g";
|
|
NSRange r = [source rangeOfString: regex options: NSRegularExpressionSearch];
|
|
PASS(r.length == 9, "Correct length for regex, expected 9 got %d", (int)r.length);
|
|
regex = @"aBcD*";
|
|
r = [source rangeOfString: regex options: (NSRegularExpressionSearch | NSCaseInsensitiveSearch)];
|
|
PASS(r.length == 9, "Correct length for regex, expected 9 got %d", (int)r.length);
|
|
|
|
[pool release];
|
|
return 0;
|
|
}
|