diff --git a/tests/test_parse_file.cpp b/tests/test_parse_file.cpp index fd49114..f6e4512 100644 --- a/tests/test_parse_file.cpp +++ b/tests/test_parse_file.cpp @@ -779,6 +779,22 @@ BOOST_AUTO_TEST_CASE(test_files_end_with_empty_lines) BOOST_TEST(toml::find(toml::find(data, "table"), "key") == "value"); } + // without newline + { + const std::string table( + "key = \"value\"\n" + "[table]\n" + "key = \"value\"\n" + "a = 0" + ); + std::istringstream iss(table); + const auto data = toml::parse(iss, + "test_files_end_with_newline.toml"); + + BOOST_TEST(toml::find(data, "key") == "value"); + BOOST_TEST(toml::find(toml::find(data, "table"), "key") == "value"); + } + // CRLF