Commit 851315c8 authored by jprochazk's avatar jprochazk

add regression test

parent d371a528
......@@ -1954,6 +1954,16 @@ TEST_CASE("regression tests")
auto val = j.value("x", defval);
auto val2 = j.value("y", defval);
}
SECTION("issue #2293 - eof doesnt cause parsing to stop")
{
std::vector<uint8_t> data =
{
0x7B, 0x6F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x4F, 0x42
};
json result = json::from_cbor(data, true, false);
CHECK(result.is_discarded());
}
}
#if !defined(JSON_NOEXCEPTION)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment