mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 05:45:39 +02:00
Add more tests for test spec parser
Originally the tests were from #1912, but as it turned out, the issue was somewhere else. Still, the inputs provided were interesting, so they are now part of our test suite.
This commit is contained in:
@@ -218,6 +218,40 @@ CmdLine.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#1912 -- test spec parser handles escaping
|
||||
Various parentheses
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( spec.matches(*fakeTestCase(R"(spec {a} char)")) )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( spec.matches(*fakeTestCase(R"(spec [a] char)")) )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_FALSE( spec.matches(*fakeTestCase("differs but has similar tag", "[a]")) )
|
||||
with expansion:
|
||||
!false
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#1912 -- test spec parser handles escaping
|
||||
backslash in test name
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( spec.matches(*fakeTestCase(R"(spec \ char)")) )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#748 - captures with unexpected exceptions
|
||||
outside assertions
|
||||
@@ -398,6 +432,6 @@ Condition.tests.cpp:<line number>: FAILED:
|
||||
CHECK( true != true )
|
||||
|
||||
===============================================================================
|
||||
test cases: 21 | 16 passed | 3 failed | 2 failed as expected
|
||||
assertions: 46 | 39 passed | 4 failed | 3 failed as expected
|
||||
test cases: 22 | 17 passed | 3 failed | 2 failed as expected
|
||||
assertions: 50 | 43 passed | 4 failed | 3 failed as expected
|
||||
|
||||
|
Reference in New Issue
Block a user