fixed BOM handling #344

This commit is contained in:
Niels 2016-10-29 21:08:30 +02:00
parent b820bb3b1f
commit a8136c578a
3 changed files with 252 additions and 285 deletions

View file

@ -159,7 +159,7 @@ TEST_CASE("Unicode", "[hide]")
}
}
}
/*
SECTION("ignore byte-order-mark")
{
// read a file with a UTF-8 BOM
@ -167,7 +167,7 @@ TEST_CASE("Unicode", "[hide]")
json j;
CHECK_NOTHROW(j << f);
}
*/
SECTION("error for incomplete/wrong BOM")
{
CHECK_THROWS_AS(json::parse("\xef\xbb"), std::invalid_argument);