| 1530 | } |
| 1531 | |
| 1532 | static bool cmdline_roundtrips(const char *const *argv) { |
| 1533 | char cmd[4096]; |
| 1534 | if (!cbm_build_win_cmdline(cmd, sizeof(cmd), argv)) { |
| 1535 | return false; |
| 1536 | } |
| 1537 | char parsed[16][256]; |
| 1538 | int pc = parse_win_cmdline(cmd, parsed, 16); |
| 1539 | int oc = 0; |
| 1540 | while (argv[oc]) { |
| 1541 | oc++; |
| 1542 | } |
| 1543 | if (pc != oc) { |
| 1544 | return false; |
| 1545 | } |
| 1546 | for (int i = 0; i < oc; i++) { |
| 1547 | if (strcmp(argv[i], parsed[i]) != 0) { |
| 1548 | return false; |
| 1549 | } |
| 1550 | } |
| 1551 | return true; |
| 1552 | } |
| 1553 | |
| 1554 | /* The exact index-worker argv: the command line with a JSON arg full of quotes. |
| 1555 | * Round-trips, AND the emitted line must contain an ESCAPED quote (\") — the bare |
no test coverage detected