add test for inline comment without trailing newline
parent
aa270ad5b7
commit
c6c6fcfeff
10
test.cpp
10
test.cpp
|
@ -105,6 +105,16 @@ int main(int argc, char **argv) {
|
||||||
printf("Result: %s\n", json_failing_comment.dump().c_str());
|
printf("Result: %s\n", json_failing_comment.dump().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
failing_comment_test = R"({// bad comment })";
|
||||||
|
|
||||||
|
json_failing_comment = Json::parse(
|
||||||
|
failing_comment_test, err_failing_comment, /*detect_comments=*/ true);
|
||||||
|
if (!err_failing_comment.empty()) {
|
||||||
|
printf("Failed: %s\n", err_failing_comment.c_str());
|
||||||
|
} else {
|
||||||
|
printf("Result: %s\n", json_failing_comment.dump().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
failing_comment_test = R"({
|
failing_comment_test = R"({
|
||||||
"a": 1
|
"a": 1
|
||||||
}/)";
|
}/)";
|
||||||
|
|
Loading…
Reference in New Issue