Differences From Artifact [6df8b869d8]:
- File
tests/OFINIFileTests.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 4098) [annotate] [blame] [check-ins using]
To Artifact [6c994673eb]:
- File tests/OFINIFileTests.m — part of check-in [25f7748cba] at 2016-10-08 15:57:59 on branch trunk — Add iOS support to Xcode project (user: js, size: 4384) [annotate] [blame] [check-ins using]
︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + | #include "config.h" #import "OFINIFile.h" #import "OFINICategory.h" #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFFile.h" #import "OFFileManager.h" #import "OFAutoreleasePool.h" #import "TestsAppDelegate.h" #if defined(OF_WINDOWS) || defined(OF_MSDOS) |
︙ | |||
57 58 59 60 61 62 63 64 65 66 67 68 69 70 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | + + + | @"float=0.25" NL @"array1=foo" NL @"array1=bar" NL @"double=0.75" NL; OFINIFile *file; OFINICategory *tests, *foobar, *types; OFArray *array; #ifndef OF_NINTENDO_DS OFString *writePath; #endif TEST(@"+[fileWithPath:encoding:]", (file = [OFINIFile fileWithPath: @"testfile.ini" encoding: OF_STRING_ENCODING_CODEPAGE_437])) tests = [file categoryForName: @"tests"]; foobar = [file categoryForName: @"foobar"]; |
︙ | |||
128 129 130 131 132 133 134 135 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | + + + + + + + - + - + - + | R([foobar removeValueForKey: @"quxqux "]) && R([types removeValueForKey: @"array2"])) module = @"OFINIFile"; /* FIXME: Find a way to write files on Nintendo DS */ #ifndef OF_NINTENDO_DS # ifndef OF_IOS writePath = @"tmpfile.ini"; # else writePath = [OFString pathWithComponents: [OFArray arrayWithObjects: [[OFApplication environment] objectForKey: @"HOME"], @"tmp", @"tmpfile.ini", nil]]; # endif TEST(@"-[writeToFile:encoding:]", |