| 296 | } |
| 297 | |
| 298 | static void remove_all(void) |
| 299 | { |
| 300 | struct json *j = json_parse(tmpctx, "['a', 'b', 'c', 'd', 'e']"); |
| 301 | json_tok_remove(&j->toks, j->toks, j->toks + 1, 5); |
| 302 | assert(tal_count(j->toks) == 1); |
| 303 | |
| 304 | j = json_parse(tmpctx, "{'1':'one', '2':'two', '3':'three', '4':'four'}"); |
| 305 | json_tok_remove(&j->toks, j->toks, j->toks + 1, 4); |
| 306 | assert(tal_count(j->toks) == 1); |
| 307 | } |
| 308 | |
| 309 | static void remove_complex(void) |
| 310 | { |
no test coverage detected