mirror of
https://github.com/nlohmann/json.git
synced 2026-02-24 12:26:25 +00:00
🚧 WIP for #4552
This commit is contained in:
@@ -995,6 +995,14 @@ TEST_CASE("regression tests 2")
|
||||
CHECK(p.x == 1);
|
||||
CHECK(p.y == 2);
|
||||
}
|
||||
|
||||
SECTION("issue #4552 - UTF-8 invalid characters are not always ignored when dumping with error_handler_t::ignore")
|
||||
{
|
||||
nlohmann::json node;
|
||||
node["test"] = "test\334\005";
|
||||
const auto test_dump = node.dump(-1, ' ', false, nlohmann::json::error_handler_t::ignore);
|
||||
CHECK(test_dump == "{\"test\":\"test\334\\u0005\"}");
|
||||
}
|
||||
}
|
||||
|
||||
DOCTEST_CLANG_SUPPRESS_WARNING_POP
|
||||
|
||||
Reference in New Issue
Block a user