2
0
mirror of https://github.com/boostorg/json.git synced 2026-01-19 04:12:14 +00:00

fix handling of comment after trailing comma

This commit is contained in:
Dmitry Arkhipov
2022-06-30 18:01:14 +03:00
parent 5874418faa
commit 75367a814e
2 changed files with 13 additions and 1 deletions

View File

@@ -167,11 +167,23 @@ public:
}
}
void
testIssue726()
{
parse_options opt;
opt.allow_comments = true;
opt.allow_trailing_commas = true;
char const* text1 = "[ 123, //\n]";
value arr = parse(text1, {}, opt);
BOOST_TEST(arr == array{123});
}
void
run()
{
testParse();
testMemoryUsage();
testIssue726();
}
};