| 51 | cbm_rmdir(fixture->path); |
| 52 | } |
| 53 | static yyjson_val *item(yyjson_doc *document, const char *key) { |
| 54 | yyjson_val *items = yyjson_obj_get(yyjson_doc_get_root(document), "settings"); |
| 55 | size_t index, max; |
| 56 | yyjson_val *value; |
| 57 | yyjson_arr_foreach(items, index, max, |
| 58 | value) if (strcmp(yyjson_get_str(yyjson_obj_get(value, "key")), key) == |
| 59 | 0) return value; |
| 60 | return NULL; |
| 61 | } |
| 62 | static yyjson_doc *read_snapshot(const char *path) { |
| 63 | char *json = cbm_runtime_settings_get_json(path); |
| 64 | yyjson_doc *document = json ? yyjson_read(json, strlen(json), 0) : NULL; |
no outgoing calls
no test coverage detected