mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Fix vendored dep because upstream is non-responsive
Eventually this needs to be fixed in the textflow project by Phil, but he has not done so in the half a year this bug has been known to be there, so... Closes #1470 Closes #1455
This commit is contained in:
parent
1e2270b370
commit
4e32e0a563
3
include/external/clara.hpp
vendored
3
include/external/clara.hpp
vendored
@ -111,6 +111,9 @@ public:
|
||||
m_suffix = false;
|
||||
auto width = m_column.m_width - indent();
|
||||
m_end = m_pos;
|
||||
if (line()[m_pos] == '\n') {
|
||||
++m_end;
|
||||
}
|
||||
while (m_end < line().size() && line()[m_end] != '\n')
|
||||
++m_end;
|
||||
|
||||
|
@ -14,6 +14,9 @@ Compilation.tests.cpp:<line number>: passed: std::memcmp(uarr, "123", sizeof(uar
|
||||
Compilation.tests.cpp:<line number>: passed: std::memcmp(sarr, "456", sizeof(sarr)) == 0 for: 0 == 0 with 2 messages: 'uarr := "123"' and 'sarr := "456"'
|
||||
Compilation.tests.cpp:<line number>: passed:
|
||||
Compilation.tests.cpp:<line number>: passed: h1 == h2 for: [1403 helper] == [1403 helper]
|
||||
Message.tests.cpp:<line number>: warning: '
|
||||
This info message starts with a linebreak' with 1 message: '
|
||||
This warning message starts with a linebreak'
|
||||
This would not be caught previously
|
||||
Nor would this
|
||||
Tricky.tests.cpp:<line number>: failed: explicitly with 1 message: '1514'
|
||||
@ -1502,5 +1505,5 @@ Misc.tests.cpp:<line number>: passed: v.size() == 5 for: 5 == 5
|
||||
Misc.tests.cpp:<line number>: passed: v.capacity() >= 5 for: 5 >= 5
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
Failed 77 test cases, failed 138 assertions.
|
||||
Failed 78 test cases, failed 139 assertions.
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
Filters: ~[!nonportable]~[!benchmark]~[approvals]
|
||||
This would not be caught previously
|
||||
Nor would this
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
<exe-name> is a <version> host application.
|
||||
@ -8,6 +6,18 @@ Run with -? for options
|
||||
|
||||
Randomness seeded to: 1
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#1455 - INFO and WARN can start with a linebreak
|
||||
-------------------------------------------------------------------------------
|
||||
Message.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Message.tests.cpp:<line number>: warning:
|
||||
|
||||
This warning message starts with a linebreak
|
||||
|
||||
This would not be caught previously
|
||||
Nor would this
|
||||
-------------------------------------------------------------------------------
|
||||
#1514: stderr/stdout is not captured in tests aborted by an exception
|
||||
-------------------------------------------------------------------------------
|
||||
@ -1265,6 +1275,6 @@ due to unexpected exception with message:
|
||||
Why would you throw a std::string?
|
||||
|
||||
===============================================================================
|
||||
test cases: 257 | 191 passed | 62 failed | 4 failed as expected
|
||||
test cases: 258 | 192 passed | 62 failed | 4 failed as expected
|
||||
assertions: 1419 | 1276 passed | 122 failed | 21 failed as expected
|
||||
|
||||
|
@ -134,6 +134,21 @@ Compilation.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
[1403 helper] == [1403 helper]
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#1455 - INFO and WARN can start with a linebreak
|
||||
-------------------------------------------------------------------------------
|
||||
Message.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Message.tests.cpp:<line number>: warning:
|
||||
|
||||
This info message starts with a linebreak
|
||||
|
||||
This warning message starts with a linebreak
|
||||
|
||||
|
||||
No assertions in test case '#1455 - INFO and WARN can start with a linebreak'
|
||||
|
||||
This would not be caught previously
|
||||
Nor would this
|
||||
-------------------------------------------------------------------------------
|
||||
@ -11113,6 +11128,6 @@ Misc.tests.cpp:<line number>
|
||||
Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 257 | 176 passed | 77 failed | 4 failed as expected
|
||||
assertions: 1435 | 1276 passed | 138 failed | 21 failed as expected
|
||||
test cases: 258 | 176 passed | 78 failed | 4 failed as expected
|
||||
assertions: 1436 | 1276 passed | 139 failed | 21 failed as expected
|
||||
|
||||
|
@ -134,6 +134,21 @@ Compilation.tests.cpp:<line number>: PASSED:
|
||||
with expansion:
|
||||
[1403 helper] == [1403 helper]
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
#1455 - INFO and WARN can start with a linebreak
|
||||
-------------------------------------------------------------------------------
|
||||
Message.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
Message.tests.cpp:<line number>: warning:
|
||||
|
||||
This info message starts with a linebreak
|
||||
|
||||
This warning message starts with a linebreak
|
||||
|
||||
|
||||
No assertions in test case '#1455 - INFO and WARN can start with a linebreak'
|
||||
|
||||
This would not be caught previously
|
||||
Nor would this
|
||||
-------------------------------------------------------------------------------
|
||||
@ -336,12 +351,7 @@ Condition.tests.cpp:<line number>: FAILED:
|
||||
Condition.tests.cpp:<line number>: FAILED:
|
||||
CHECK( true != true )
|
||||
|
||||
Condition.tests.cpp:<line number>: FAILED:
|
||||
CHECK( !true )
|
||||
with expansion:
|
||||
false
|
||||
|
||||
===============================================================================
|
||||
test cases: 17 | 13 passed | 2 failed | 2 failed as expected
|
||||
test cases: 18 | 13 passed | 3 failed | 2 failed as expected
|
||||
assertions: 40 | 33 passed | 4 failed | 3 failed as expected
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<property name="random-seed" value="1"/>
|
||||
</properties>
|
||||
loose text artifact
|
||||
<testsuite name="<exe-name>" errors="17" failures="122" tests="1436" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testsuite name="<exe-name>" errors="17" failures="123" tests="1437" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||
<testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="#1027" time="{duration}"/>
|
||||
@ -14,6 +14,7 @@ loose text artifact
|
||||
<testcase classname="<exe-name>.global" name="#1238" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.(Fixture_1245<int, int>)" name="#1245" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="#1403" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="#1455 - INFO and WARN can start with a linebreak" time="{duration}"/>
|
||||
<testcase classname="<exe-name>.global" name="#1514: stderr/stdout is not captured in tests aborted by an exception" time="{duration}">
|
||||
<failure type="FAIL">
|
||||
1514
|
||||
|
@ -142,6 +142,17 @@
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<TestCase name="#1455 - INFO and WARN can start with a linebreak" tags="[.][messages]" filename="projects/<exe-name>/UsageTests/Message.tests.cpp" >
|
||||
<Info>
|
||||
|
||||
This info message starts with a linebreak
|
||||
</Info>
|
||||
<Warning>
|
||||
|
||||
This warning message starts with a linebreak
|
||||
</Warning>
|
||||
<OverallResult success="false"/>
|
||||
</TestCase>
|
||||
<TestCase name="#1514: stderr/stdout is not captured in tests aborted by an exception" tags="[.][output-capture][regression]" filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
|
||||
<Failure filename="projects/<exe-name>/UsageTests/Tricky.tests.cpp" >
|
||||
1514
|
||||
@ -13388,7 +13399,7 @@ loose text artifact
|
||||
</Section>
|
||||
<OverallResult success="true"/>
|
||||
</TestCase>
|
||||
<OverallResults successes="1276" failures="139" expectedFailures="21"/>
|
||||
<OverallResults successes="1276" failures="140" expectedFailures="21"/>
|
||||
</Group>
|
||||
<OverallResults successes="1276" failures="138" expectedFailures="21"/>
|
||||
<OverallResults successes="1276" failures="139" expectedFailures="21"/>
|
||||
</Catch>
|
||||
|
@ -14,6 +14,13 @@ TEST_CASE( "INFO and WARN do not abort tests", "[messages][.]" ) {
|
||||
WARN( "this is a " << "warning" ); // This should always output the message but then continue
|
||||
}
|
||||
|
||||
TEST_CASE( "#1455 - INFO and WARN can start with a linebreak", "[messages][.]" ) {
|
||||
// Previously these would be hidden from the console reporter output,
|
||||
// because it would fail at properly reflowing the text
|
||||
INFO( "\nThis info message starts with a linebreak" );
|
||||
WARN( "\nThis warning message starts with a linebreak" );
|
||||
}
|
||||
|
||||
TEST_CASE( "SUCCEED counts as a test pass", "[messages]" ) {
|
||||
SUCCEED( "this is a " << "success" );
|
||||
}
|
||||
|
3
third_party/clara.hpp
vendored
3
third_party/clara.hpp
vendored
@ -110,6 +110,9 @@ namespace clara { namespace TextFlow {
|
||||
m_suffix = false;
|
||||
auto width = m_column.m_width-indent();
|
||||
m_end = m_pos;
|
||||
if (line()[m_pos] == '\n') {
|
||||
++m_end;
|
||||
}
|
||||
while( m_end < line().size() && line()[m_end] != '\n' )
|
||||
++m_end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user