| 587 | |
| 588 | #ifdef _WIN32 |
| 589 | static bool test_append_command_hook(yyjson_mut_doc *doc, yyjson_mut_val *event_entries, |
| 590 | const char *matcher, const char *command) { |
| 591 | yyjson_mut_val *entry = yyjson_mut_obj(doc); |
| 592 | yyjson_mut_val *hooks = yyjson_mut_arr(doc); |
| 593 | yyjson_mut_val *hook = yyjson_mut_obj(doc); |
| 594 | return entry && hooks && hook && yyjson_mut_obj_add_str(doc, entry, "matcher", matcher) && |
| 595 | yyjson_mut_obj_add_str(doc, hook, "type", "command") && |
| 596 | yyjson_mut_obj_add_str(doc, hook, "command", command) && |
| 597 | yyjson_mut_arr_append(hooks, hook) && |
| 598 | yyjson_mut_obj_add_val(doc, entry, "hooks", hooks) && |
| 599 | yyjson_mut_arr_append(event_entries, entry); |
| 600 | } |
| 601 | |
| 602 | static size_t test_count_hook_command(yyjson_val *root, const char *event_name, |
| 603 | const char *expected_command) { |