Fix several unescaping issues

This commit is contained in:
2025-05-19 13:10:24 -04:00
parent 553a273a1b
commit d9bb22e6b1
2 changed files with 23 additions and 19 deletions

View File

@@ -37,9 +37,19 @@ std::pair<std::string, parser3::Status> runBatch(std::string copy) {
}
void testStreaming(std::string const &json) {
auto result1 = runStreaming(json);
auto result2 = runBatch(json);
if (result1 != result2) {
auto streaming = runStreaming(json);
auto batch = runBatch(json);
if (streaming != batch) {
if (streaming.second == batch.second && streaming.second != parser3::S_OK) {
// It's ok if the processed data doesn't match if parsing failed
return;
}
printf("streaming: %s, %s\n",
streaming.second == parser3::S_OK ? "accept" : "reject",
streaming.first.c_str());
printf("batch: %s, %s\n",
streaming.second == parser3::S_OK ? "accept" : "reject",
batch.first.c_str());
abort();
}
}