1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-15 07:41:50 +03:00

ignore UTF-8 byte order mark (fixes #152)

This commit is contained in:
Niels
2015-12-07 22:27:53 +01:00
parent e0d334c4f1
commit 9da8770f3a
4 changed files with 271 additions and 212 deletions

View File

@ -10022,6 +10022,14 @@ TEST_CASE("Unicode", "[hide]")
// the array has 1112064 + 1 elemnts (a terminating "null" value)
CHECK(j.size() == 1112065);
}
SECTION("ignore byte-order-mark")
{
// read a file with a UTF-8 BOM
std::ifstream f("test/json_nlohmann_tests/bom.json");
json j;
CHECK_NOTHROW(j << f);
}
}
TEST_CASE("regression tests")