| 327 | } |
| 328 | |
| 329 | static void remove_all(void) |
| 330 | { |
| 331 | struct json *j = json_parse(tmpctx, "['a', 'b', 'c', 'd', 'e']"); |
| 332 | json_tok_remove(&j->toks, j->toks, j->toks + 1, 5); |
| 333 | assert(tal_count(j->toks) == 1); |
| 334 | |
| 335 | j = json_parse(tmpctx, "{'1':'one', '2':'two', '3':'three', '4':'four'}"); |
| 336 | json_tok_remove(&j->toks, j->toks, j->toks + 1, 4); |
| 337 | assert(tal_count(j->toks) == 1); |
| 338 | } |
| 339 | |
| 340 | static void remove_complex(void) |
| 341 | { |
no test coverage detected