mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
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:

committed by
Martin Hořeňovský

parent
979bbf03bb
commit
9c741fe960
@@ -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
|
||||
|
Reference in New Issue
Block a user