mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Test case for the [NSRegularExpression pattern] bug
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39961 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
62b2fb95b8
commit
dfe7feebf2
2 changed files with 13 additions and 0 deletions
|
@ -73,6 +73,14 @@ int main()
|
|||
test_NSCopying(@"NSRegularExpression",@"NSRegularExpression",
|
||||
[NSArray arrayWithObject:testObj],NO,NO);
|
||||
|
||||
NSAutoreleasePool *iPool = [NSAutoreleasePool new];
|
||||
{
|
||||
PASS_EQUAL([testObj pattern], @"^a", "Correct pattern returned");
|
||||
}
|
||||
DESTROY(iPool);
|
||||
/* Regression test: We had a double-free bug on retrieving pattern,
|
||||
* which is also the reason for wrapping the previous one in an ARP */
|
||||
PASS_RUNS([testObj pattern], "Calling -pattern twice runs");
|
||||
|
||||
/* To test whether we correctly bail out of processing degenerate patterns,
|
||||
* we spin up a new thread and evaluate an expression there. The expectation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue