mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fix for #243
This commit is contained in:
parent
61d14215fa
commit
ae72ee4593
3 changed files with 22 additions and 2 deletions
|
@ -40,6 +40,13 @@ testString(NSDictionary *dict)
|
|||
PASS([p evaluateWithObject: dict], "%%K BEGINSWITH %%@");
|
||||
p = [NSPredicate predicateWithFormat: @"(%K == %@) AND (%K == %@)", @"Record1.Name", @"John", @"Record2.Name", @"Mary"];
|
||||
PASS([p evaluateWithObject: dict], "(%%K == %%@) AND (%%K == %%@)");
|
||||
|
||||
NSMutableArray *strings = [NSMutableArray arrayWithObjects: @"a", @"aa",
|
||||
@"aaa", @"aaaa", nil];
|
||||
NSArray *expect = [NSMutableArray arrayWithObjects: @"aaa", @"aaaa", nil];
|
||||
p = [NSPredicate predicateWithFormat: @"self beginswith 'aaa'"];
|
||||
[strings filterUsingPredicate: p];
|
||||
PASS_EQUAL(strings, expect, "filter using BEGINSWITH")
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue