Created
May 23, 2011 15:00
-
-
Save threeve/986829 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface Foo : NSObject | |
@end | |
@implementation Foo | |
- (NSString*)description; | |
{ | |
return @"this\nhas\nnewlines"; | |
} | |
@end | |
int main (int argc, const char * argv[]) | |
{ | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
NSArray *foos = [NSArray arrayWithObjects:[[Foo new] autorelease], [[Foo new] autorelease], nil]; | |
NSLog(@"foos: %@", foos); | |
// Actual output: | |
// 2011-05-23 09:59:23.863 Logged[1074:a0f] foos: ( | |
// "this\nhas\nnewlines", | |
// "this\nhas\nnewlines" | |
// ) | |
// Expected: | |
// 2011-05-23 09:59:23.863 Logged[1074:a0f] foos: ( | |
// "this | |
// has | |
// newlines", | |
// "this | |
// has | |
// newlines" | |
// ) | |
[pool drain]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment