diff options
Diffstat (limited to 'runtime/test/process_cmdline_test.cpp')
| -rw-r--r-- | runtime/test/process_cmdline_test.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/test/process_cmdline_test.cpp b/runtime/test/process_cmdline_test.cpp index fb0a0498c..89a1b7f03 100644 --- a/runtime/test/process_cmdline_test.cpp +++ b/runtime/test/process_cmdline_test.cpp | |||
| @@ -269,6 +269,23 @@ int main() { | |||
| 269 | SetProcessAffinityMask(GetCurrentProcess(), process_mask); | 269 | SetProcessAffinityMask(GetCurrentProcess(), process_mask); |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | // The title's debug output is served (and logged as "[title] ..."); TerminateProcess is served by the shim too. | ||
| 273 | { | ||
| 274 | using DebugA = void(WINAPI*)(LPCSTR); | ||
| 275 | using DebugW = void(WINAPI*)(LPCWSTR); | ||
| 276 | const auto debug_a = reinterpret_cast<DebugA>(rt::shims::find("kernelbase.dll", "OutputDebugStringA")); | ||
| 277 | const auto debug_w = | ||
| 278 | reinterpret_cast<DebugW>(rt::shims::find("api-ms-win-core-debug-l1-1-0.dll", "OutputDebugStringW")); | ||
| 279 | if (!debug_a || !debug_w || !rt::shims::find("kernel32.dll", "TerminateProcess")) { | ||
| 280 | std::fprintf(stderr, "FAIL OutputDebugStringA/W and TerminateProcess are not served\n"); | ||
| 281 | ++failures; | ||
| 282 | } else { | ||
| 283 | debug_a("process_cmdline: a narrow debug line\n"); | ||
| 284 | debug_w(L"process_cmdline: a wide debug line Δ"); | ||
| 285 | debug_a(nullptr); | ||
| 286 | } | ||
| 287 | } | ||
| 288 | |||
| 272 | if (failures) return 1; | 289 | if (failures) return 1; |
| 273 | std::printf("process_cmdline: GetCommandLineW parses back to __wargv, non-ASCII arguments intact (code page %u); " | 290 | std::printf("process_cmdline: GetCommandLineW parses back to __wargv, non-ASCII arguments intact (code page %u); " |
| 274 | "the WinMain line and the kernelbase/API-set names are the game's\n", | 291 | "the WinMain line and the kernelbase/API-set names are the game's\n", |