upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/process_cmdline_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/test/process_cmdline_test.cpp')
-rw-r--r--runtime/test/process_cmdline_test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/test/process_cmdline_test.cpp b/runtime/test/process_cmdline_test.cpp
index 01f1b38a5..79aeed11b 100644
--- a/runtime/test/process_cmdline_test.cpp
+++ b/runtime/test/process_cmdline_test.cpp
@@ -193,6 +193,17 @@ int main() {
193 // A byte above 0x7f in the narrow program name is part of the name, not the end of it. 193 // A byte above 0x7f in the narrow program name is part of the name, not the end of it.
194 check_winmain(L"caf\u00e9.exe", {L"-x"}, L"-x", "a non-ASCII program name"); 194 check_winmain(L"caf\u00e9.exe", {L"-x"}, L"-x", "a non-ASCII program name");
195 195
196 // If the entry thread exits via ExitThread() without going through end_run(), run_entry() must preserve its exit
197 // code (and claim g_exited before closing g_done).
198 {
199 auto exit_thread_entry = +[](void*) -> DWORD { ExitThread(42); };
200 const int code = rt::process::run_entry(reinterpret_cast<void*>(exit_thread_entry), 0);
201 if (code != 42) {
202 std::fprintf(stderr, "FAIL run_entry with ExitThread(42) returned %d, want 42\n", code);
203 ++failures;
204 }
205 }
206
196 if (failures) return 1; 207 if (failures) return 1;
197 std::printf("process_cmdline: GetCommandLineW parses back to __wargv, non-ASCII arguments intact (code page %u); " 208 std::printf("process_cmdline: GetCommandLineW parses back to __wargv, non-ASCII arguments intact (code page %u); "
198 "the WinMain line and the kernelbase/API-set names are the game's\n", 209 "the WinMain line and the kernelbase/API-set names are the game's\n",