112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
R([foobar removeValueForKey: @"quxqux "]) &&
R([types removeValueForKey: @"array2"]))
module = @"OFINIFile";
/* FIXME: Find a way to write files on Nintendo DS */
#if defined(OF_HAVE_FILES) && !defined(OF_NINTENDO_DS)
writeIRI = [[OFSystemInfo temporaryDirectoryIRI]
IRIByAppendingPathComponent: @"objfw-tests.ini"
isDirectory: false];
TEST(@"-[writeToFile:encoding:]",
R([file writeToIRI: writeIRI
encoding: OFStringEncodingCodepage437]) &&
[[OFString stringWithContentsOfIRI: writeIRI
encoding: OFStringEncodingCodepage437]
isEqual: output])
[[OFFileManager defaultManager] removeItemAtIRI: writeIRI];
|
|
>
>
|
|
|
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
R([foobar removeValueForKey: @"quxqux "]) &&
R([types removeValueForKey: @"array2"]))
module = @"OFINIFile";
/* FIXME: Find a way to write files on Nintendo DS */
#if defined(OF_HAVE_FILES) && !defined(OF_NINTENDO_DS)
writeIRI = [OFSystemInfo temporaryDirectoryIRI];
if (writeIRI == nil)
writeIRI = [[OFFileManager defaultManager] currentDirectoryIRI];
writeIRI = [writeIRI IRIByAppendingPathComponent: @"objfw-tests.ini"
isDirectory: false];
TEST(@"-[writeToFile:encoding:]",
R([file writeToIRI: writeIRI
encoding: OFStringEncodingCodepage437]) &&
[[OFString stringWithContentsOfIRI: writeIRI
encoding: OFStringEncodingCodepage437]
isEqual: output])
[[OFFileManager defaultManager] removeItemAtIRI: writeIRI];
|