ObjFW  Check-in [7937aed40b]

Overview
Comment:Workaround for OFSubprocessTests on Windows 9x
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 1.1
Files: files | file ages | folders
SHA3-256: 7937aed40b9a909b6dcf0fb44e7d1f3684f5e8493dd708b8f276f97588041dc8
User & Date: js on 2024-04-28 11:56:49
Other Links: branch diff | manifest | tags
Context
2024-04-28
12:47
Skip (sym)link tests if unavailable check-in: 2ea81cb7c3 user: js tags: 1.1
11:56
Workaround for OFSubprocessTests on Windows 9x check-in: 7937aed40b user: js tags: 1.1
11:56
Workaround for OFSubprocessTests on Windows 9x check-in: cd829b4336 user: js tags: trunk
2024-04-27
01:56
GitHub Actions: Replace macos-latest with macos-12 check-in: c663f94788 user: js tags: 1.1
Changes

Modified tests/subprocess/Subprocess.m from [75e4dad33e] to [f5dfed46e5].

32
33
34
35
36
37
38
39
40
41








42
43
44
45
46
47
	OFString *line;

	if (![[OFApplication arguments] isEqual:
	    [OFArray arrayWithObjects: @"tést", @"123", nil]])
		[OFApplication terminateWithStatus: 1];

	if (![[[OFApplication environment] objectForKey: @"tëst"]
	    isEqual: @"yés"])
		[OFApplication terminateWithStatus: 2];









	while ((line = [OFStdIn readLine]) != nil)
		[OFStdOut writeLine: line.uppercaseString];

	[OFApplication terminate];
}
@end







|

|
>
>
>
>
>
>
>
>
|
|




32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
	OFString *line;

	if (![[OFApplication arguments] isEqual:
	    [OFArray arrayWithObjects: @"tést", @"123", nil]])
		[OFApplication terminateWithStatus: 1];

	if (![[[OFApplication environment] objectForKey: @"tëst"]
	    isEqual: @"yés"]) {
		[OFApplication terminateWithStatus: 2];
	}

#ifdef OF_WINDOWS
	/* On Windows 9x, closing the pipe doesn't seem to cause EOF. */
	if (![OFSystemInfo isWindowsNT]) {
		if ((line = [OFStdIn readLine]) != nil)
			[OFStdOut writeLine: line.uppercaseString];
	} else
#endif
		while ((line = [OFStdIn readLine]) != nil)
			[OFStdOut writeLine: line.uppercaseString];

	[OFApplication terminate];
}
@end