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 38f897c887
commit 37cbf4a4fe
8 changed files with 144 additions and 9 deletions

View File

@@ -209,6 +209,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
@@ -389,6 +423,6 @@ Condition.tests.cpp:<line number>: FAILED:
CHECK( true != true )
===============================================================================
test cases: 20 | 15 passed | 3 failed | 2 failed as expected
assertions: 45 | 38 passed | 4 failed | 3 failed as expected
test cases: 21 | 16 passed | 3 failed | 2 failed as expected
assertions: 49 | 42 passed | 4 failed | 3 failed as expected