mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-27 02:30:53 +00:00
15 lines
523 B
Mathematica
15 lines
523 B
Mathematica
|
#import <Foundation/NSString.h>
|
||
|
#import "ObjectTesting.h"
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
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);
|
||
|
return 0;
|
||
|
}
|