Allow quotes in CAPTURE arguments (#1608)

* Allow quotes in CAPTURE arguments

Fix CAPTURE to handle string and character literals properly
This commit is contained in:
Petr Ledvina 2019-05-01 19:12:44 +02:00 committed by Martin Hořeňovský
parent 979bbf03bb
commit 9c741fe960
7 changed files with 87 additions and 7 deletions

View file

@ -251,6 +251,13 @@ TEST_CASE("CAPTURE can deal with complex expressions involving commas", "[messag
SUCCEED();
}
TEST_CASE("CAPTURE parses string and character constants", "[messages][capture]") {
CAPTURE(("comma, in string", "escaped, \", "), "single quote in string,',", "some escapes, \\,\\\\");
CAPTURE("some, ), unmatched, } prenheses {[<");
CAPTURE('"', '\'', ',', '}', ')', '(', '{');
SUCCEED();
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif