mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
64bit printf tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34400 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5c38f0b4c9
commit
c21cdfad4d
1 changed files with 19 additions and 0 deletions
|
@ -13,6 +13,25 @@ int main()
|
|||
[NSArray arrayWithObject:testObj], NO, NO);
|
||||
test_NSMutableCopying(@"NSArray",@"NSMutableArray",
|
||||
[NSArray arrayWithObject:testObj]);
|
||||
|
||||
NSMutableString *str1, *str2;
|
||||
unichar chars[3];
|
||||
|
||||
chars[0] = '\"';
|
||||
chars[1] = 1;
|
||||
str1 = [NSMutableString stringWithCharacters: chars length: 2];
|
||||
[str1 replaceOccurrencesOfString: @"\""
|
||||
withString: @"\\\""
|
||||
options: 0
|
||||
range: NSMakeRange(0, [str1 length])];
|
||||
|
||||
chars[0] = '\\';
|
||||
chars[1] = '\"';
|
||||
chars[2] = 1;
|
||||
str2 = [NSMutableString stringWithCharacters: chars length: 3];
|
||||
NSLog(@"string 1 %@ string 2 %@", str1, str2);
|
||||
PASS([str1 isEqual: str2],
|
||||
"string occurrences replacement works");
|
||||
[arp release]; arp = nil;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue