ObjFW  Check-in [07a3215739]

Overview
Comment:OFINIFileTests: Handle nil temporaryDirectoryIRI
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 07a321573948c35fd39b604d560a5b14d33fc5cf4c9d916df7ec9a178b43962d
User & Date: js on 2022-12-04 23:23:21
Other Links: manifest | tags
Context
2022-12-05
00:50
OFLocale: Default to codepage 437 on MS-DOS check-in: 8a459e4b5d user: js tags: trunk
2022-12-04
23:23
OFINIFileTests: Handle nil temporaryDirectoryIRI check-in: 07a3215739 user: js tags: trunk
23:01
Include <syslimits.h> on DJGPP for PATH_MAX check-in: e76f2e482a user: js tags: trunk
Changes

Modified tests/OFINIFileTests.m from [cf313772fa] to [c89eca95dd].

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];