mirror of
https://github.com/nlohmann/json.git
synced 2025-07-22 15:21:52 +03:00
fixed #306
This commit is contained in:
@ -31,6 +31,8 @@ SOFTWARE.
|
||||
#include "json.hpp"
|
||||
using nlohmann::json;
|
||||
|
||||
#include <fstream>
|
||||
|
||||
TEST_CASE("regression tests")
|
||||
{
|
||||
SECTION("issue #60 - Double quotation mark is not parsed correctly")
|
||||
@ -440,4 +442,19 @@ TEST_CASE("regression tests")
|
||||
|
||||
CHECK(at_integer == val_integer);
|
||||
}
|
||||
|
||||
SECTION("issue #306 - Parsing fails without space at end of file")
|
||||
{
|
||||
for (auto filename :
|
||||
{
|
||||
"test/data/regression/broken_file.json",
|
||||
"test/data/regression/working_file.json"
|
||||
})
|
||||
{
|
||||
CAPTURE(filename);
|
||||
json j;
|
||||
std::ifstream f(filename);
|
||||
CHECK_NOTHROW(j << f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user