| 1968 | } |
| 1969 | |
| 1970 | static int jl_write_document(const char *path, const char *content, size_t length, |
| 1971 | const char *expected_content, size_t expected_length, |
| 1972 | const jl_file_snapshot_t *expected_snapshot) { |
| 1973 | size_t root = 0; |
| 1974 | if (jl_validate_document(content, length, &root) != 0) { |
| 1975 | return -1; |
| 1976 | } |
| 1977 | return jl_write_atomic(path, content, length, expected_content, expected_length, |
| 1978 | expected_snapshot); |
| 1979 | } |
| 1980 | |
| 1981 | #ifdef CBM_JSON_LIKE_ENABLE_TEST_API |
| 1982 | void cbm_json_like_set_precommit_hook_for_testing(cbm_json_like_precommit_test_hook_t hook, |
no test coverage detected