From 8565a07570ccd38209dd593c1116e917cd7c7230 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Thu, 6 Aug 2015 13:34:32 +0200 Subject: Add test for EOF within key --- test/io/read_test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/io/read_test.cpp') diff --git a/test/io/read_test.cpp b/test/io/read_test.cpp index d13402c2ea..ab1a46cc97 100644 --- a/test/io/read_test.cpp +++ b/test/io/read_test.cpp @@ -153,6 +153,13 @@ void test_read_errors() ASSERT(file); EXPECT_EXCEPTION(reader.read_tag(), io::input_error); ASSERT(!file); + + //EOF within a key in a compound + file.close(); + file.open("errortest_eof2", std::ios::binary); + ASSERT(file); + EXPECT_EXCEPTION(reader.read_tag(), io::input_error); + ASSERT(!file); } int main() -- cgit 0.0.5-2-1-g0f52