This is may be nitpicky, but adding a newline at the end - if wanted - is probably less a hassle than to remove it if unwanted.
{
const auto data = R"(array=["v1", "v2", "v3"])"sv;
auto table = toml::parse(data);
std::stringstream ss;
ss << table;
REQUIRE(ss.str() == "array = [ 'v1', 'v3' ]\n"sv); // NOTE extra newline at end
}