17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "ObjFW.h"
#import "ObjFWTest.h"
@interface OFINIFileTests: OTTestCase
{
OFINIFile *_file;
}
@end
|
>
>
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "ObjFW.h"
#import "ObjFWTest.h"
#import "OFEmbeddedIRIHandler.h"
@interface OFINIFileTests: OTTestCase
{
OFINIFile *_file;
}
@end
|
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
OTAssertEqualObjects([types arrayValueForKey: @"array2"], array);
OTAssertEqualObjects([types arrayValueForKey: @"array3"],
[OFArray array]);
}
- (void)testWriteToIRIEncoding
{
OFString *expectedOutput = @"[tests]\r\n"
@"foo=baz\r\n"
@"foobar=baz\r\n"
@";comment\r\n"
@"new=new\r\n"
@"\r\n"
@"[foobar]\r\n"
@";foobarcomment\r\n"
@"qux=\" asd\"\r\n"
@"quxquxqux=\"hello\\\"wörld\"\r\n"
@"qux2=\"a\\f\"\r\n"
@"qux3=a\fb\r\n"
@"\r\n"
@"[types]\r\n"
@"integer=16\r\n"
@"bool=false\r\n"
@"float=0.25\r\n"
@"array1=foo\r\n"
@"array1=bar\r\n"
|
|
>
>
>
|
|
>
|
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
OTAssertEqualObjects([types arrayValueForKey: @"array2"], array);
OTAssertEqualObjects([types arrayValueForKey: @"array3"],
[OFArray array]);
}
- (void)testWriteToIRIEncoding
{
OFString *expectedOutput = @"; Comment in global category\r\n"
@"global=yes\r\n"
@"\r\n"
@"[tests]\r\n"
@"foo=baz\r\n"
@"foobar=baz\r\n"
@";comment\r\n"
@"new=new\r\n"
@"\r\n"
@"[foobar]\r\n"
@"#foobarcomment\r\n"
@"qux=\" asd\"\r\n"
@"quxquxqux=\"hello\\\"wörld\"\r\n"
@"qux2=\"a\\n\"\r\n"
@"\"asd=asd\"=foobar\r\n"
@"qux3=\"a\\fb\"\r\n"
@"\r\n"
@"[types]\r\n"
@"integer=16\r\n"
@"bool=false\r\n"
@"float=0.25\r\n"
@"array1=foo\r\n"
@"array1=bar\r\n"
|