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:
Martin Hořeňovský
2020-04-17 21:16:18 +02:00
parent bbbc7a0d7f
commit dd35430a2b
11 changed files with 156 additions and 10 deletions

View File

@@ -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
@@ -14679,6 +14713,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 333 | 243 passed | 86 failed | 4 failed as expected
assertions: 1893 | 1724 passed | 148 failed | 21 failed as expected
test cases: 334 | 244 passed | 86 failed | 4 failed as expected
assertions: 1897 | 1728 passed | 148 failed | 21 failed as expected