Differences From Artifact [7188d57b9b]:
- File tests/OFINIFileTests.m — part of check-in [1a86b8175b] at 2022-02-12 07:46:07 on branch trunk — Update copyright (user: js, size: 3952) [annotate] [blame] [check-ins using] [more...]
To Artifact [18e2931d0e]:
- File
tests/OFINIFileTests.m
— part of check-in
[9b3cae6cba]
at
2022-10-09 16:33:24
on branch trunk
— Drop of- prefix from URI schemes
It's generally uncommon to prefix those.
Additionally, it might be worthwhile to try to get those actually
registered, which requires usage. (user: js, size: 4079) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
39 40 41 42 43 44 45 46 47 48 | @"[types]\r\n" @"integer=16\r\n" @"bool=false\r\n" @"float=0.25\r\n" @"array1=foo\r\n" @"array1=bar\r\n" @"double=0.75\r\n"; OFINIFile *file; OFINICategory *tests, *foobar, *types; OFArray *array; | > | | > | | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | @"[types]\r\n" @"integer=16\r\n" @"bool=false\r\n" @"float=0.25\r\n" @"array1=foo\r\n" @"array1=bar\r\n" @"double=0.75\r\n"; OFURI *URI; OFINIFile *file; OFINICategory *tests, *foobar, *types; OFArray *array; #if defined(OF_HAVE_FILES) && !defined(OF_NINTENDO_DS) OFURI *writeURI; #endif module = @"OFINIFile"; URI = [OFURI URIWithString: @"embedded:testfile.ini"]; TEST(@"+[fileWithURI:encoding:]", (file = [OFINIFile fileWithURI: URI encoding: OFStringEncodingCodepage437])) tests = [file categoryForName: @"tests"]; foobar = [file categoryForName: @"foobar"]; types = [file categoryForName: @"types"]; TEST(@"-[categoryForName:]", tests != nil && foobar != nil && types != nil) |
︙ | ︙ | |||
109 110 111 112 113 114 115 | TEST(@"-[removeValueForKey:]", R([foobar removeValueForKey: @"quxqux "]) && R([types removeValueForKey: @"array2"])) module = @"OFINIFile"; /* FIXME: Find a way to write files on Nintendo DS */ | | | | > | | | | | | 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 | TEST(@"-[removeValueForKey:]", 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) writeURI = [[OFSystemInfo temporaryDirectoryURI] URIByAppendingPathComponent: @"objfw-tests.ini" isDirectory: false]; TEST(@"-[writeToFile:encoding:]", R([file writeToURI: writeURI encoding: OFStringEncodingCodepage437]) && [[OFString stringWithContentsOfURI: writeURI encoding: OFStringEncodingCodepage437] isEqual: output]) [[OFFileManager defaultManager] removeItemAtURI: writeURI]; #else (void)output; #endif objc_autoreleasePoolPop(pool); } @end |