mirror of
https://github.com/nlohmann/json.git
synced 2026-05-22 22:25:33 +00:00
Quick and dirty implementation for basic multilingual plane in the unicode escape mechanism
This commit is contained in:
@@ -1652,6 +1652,10 @@ TEST_CASE("Parser")
|
||||
CHECK(json::parse("\"a\\nz\"") == json("a\nz"));
|
||||
CHECK(json::parse("\"\\n\"") == json("\n"));
|
||||
|
||||
// escape unicode characters
|
||||
CHECK(json::parse("\"\\u002F\"") == json("/"));
|
||||
CHECK(json::parse("\"\\u00E4\"") == json(u8"\u00E4"));
|
||||
|
||||
// escaping senseless stuff
|
||||
CHECK_THROWS_AS(json::parse("\"\\z\""), std::invalid_argument);
|
||||
CHECK_THROWS_AS(json::parse("\"\\ \""), std::invalid_argument);
|
||||
|
||||
Reference in New Issue
Block a user