test: in case of comment-before-comma

This commit is contained in:
ToruNiina 2020-09-19 18:24:23 +09:00
parent 670186fac7
commit b0784ce286

View File

@ -172,3 +172,19 @@ BOOST_AUTO_TEST_CASE(test_heterogeneous_array)
}
#endif
}
BOOST_AUTO_TEST_CASE(test_comments_after_comma)
{
{
array a;
a.push_back("foo");
a.push_back("bar");
a.push_back("baz");
TOML11_TEST_PARSE_EQUAL_VALUE(parse_value<toml::value>, R"([
"foo" # comment
, "bar" # comment
, "baz" # comment
]
)", toml::value(a));
}
}